[ros-dev] Question regarding declaration of RTL_DRIVE_LETTER_CURDIR in include\ndk\rtltypes.h

Ged Murphy gedmurphy at gmail.com
Mon Nov 15 08:33:43 UTC 2010


Colin Finck wrote:
> 
> Sven Barth <pascaldragon at googlemail.com> wrote:
> > Shouldn't it be "_RTL_DRIVE_LETTER_CURDIR" instead of
> > "RTL_DRIVE_LETTER_CURDIR"?
> 
> It doesn't matter if you just define a variable using this structure 
> like "RTL_DRIVE_LETTER_CURDIR MyVariable;".


It matters from a debugging perspective. The symbols store the struct name,
not the typedef.
Anyone expecting to dump data based on the data type with an underscore
would get an error on reactos.

I've just had a look at win7:

0: kd> dt ntdll!RTL_DRIVE_LETTER_CURDIR
Symbol ntdll!RTL_DRIVE_LETTER_CURDIR not found.
0: kd> dt ntdll!_RTL_DRIVE_LETTER_CURDIR
   +0x000 Flags            : Uint2B
   +0x002 Length           : Uint2B
   +0x004 TimeStamp        : Uint4B
   +0x008 DosPath          : _STRING

So we actually break compatibility with Windows by not copying struct names
exactly.
This is indeed a typo that needs fixing.

Ged.




More information about the Ros-dev mailing list