Good idea, thanks.
The hex value should be on the same line. I usually don’t use grep but line based searching in my file manager and in this case I’d seach first for “FILE_DEVICE*4d” (which wouldn’t work in this case anyway because creator didn’t follow this convention, too) and the second would be “#define*4d”.
#define MOUNTDEVCONTROLTYPE ((ULONG) ‘M’) // 0x4D
would be sufficient but
#define FILE_DEVICE_MOUNTDEV 0x4D // ‘M’
would be even better. Who else should follow rules, written or unwritten, than WDK headers?
BTW, if we talk about stupid definitions, this is my favorite one:
#define FILE_DEVICE_USB FILE_DEVICE_UNKNOWN
Best regards,
Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]
From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
Reply To: Windows System Software Devs Interest List
Sent: Wednesday, July 18, 2007 10:56 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How can I find the meaning of IoControlCode?
FWIW, I am tring to find the owner of the header and update it so that
the hex value shows up near the IOCTL definition so that a grep will
find the value.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tim Roberts
Sent: Wednesday, July 18, 2007 1:46 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How can I find the meaning of IoControlCode?
Michal Vodicka wrote:
>>
> Don’t forget to apply Hanlon’s razor: “Never attribute to malice that
which can be adequately explained by stupidity.”
>
Or habit.
> In this case the developer probably enjoyed his smart idea and didn’t
even imagine poor DDK users who search for unknown IOCTLs. Ask yourself
if you’d resist and use 0x4d instead of nice ‘M’ for Mount Manager
>
It is also possible (although only wild speculation) that the developer
had a Unix background. In Unix, it is common to use an ASCII letter as
a qualifier for ioctl codes.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer