Possible WDK 6000 Bug.

Hi All,
I think there is a problem/intentional change in WDM.h in WDK6000.
According to documentation [and in WDM.h with WDK5384] the
CM_PARTIAL_RESOURCE_DESCRIPTOR had the MessageInterrupt memeber as




struct {
union {
struct {
USHORT DataPayload;
USHORT MessageCount;
ULONG Vector;
ULONG_PTR MessageTargetAddress;
} Raw;
struct {
ULONG Level;
ULONG Vector;
KAFFINITY Affinity;
} Translated;
};
} MessageInterrupt;

But in WDM.h [WDK 6000] the member is changed to




struct {
union {
struct {
USHORT Reserved;
<<<<<<<<<<<<<<<<<<<<< CHANGED
USHORT MessageCount;
ULONG Vector;
KAFFINITY Affinity;
<<<<<<<<<<<<<<<<<<<<< CHANGED
} Raw;

struct {

ULONG Level;

ULONG Vector;

KAFFINITY Affinity;

} Translated;

};

} MessageInterrupt;

Hence the code that was compiling in WDK5384 will not compile on
WDK6000. If this change was intentional the help documentation not
updated which is a bit confusing.

Please advise.

Thanks,

  • Aj

Yes, this was an intentional change. This change was made well before the WDK shipped, 5384 is also a pretty old WDK compared to the 6000 build of the WDK. The docs typically do not talk about interim WDK builds and how they are different from the release build of the product. As you found out, the change is self evident when you try to compile your driver.

d

AJ:

Have you tried compiling it? The only reason I ask is that it sounds
like you might be basing this on inconsistencies between the
documentation and the header file. While I have seen a small handful of
what I at least at the time thought were legitimate errors, but what
your saying would break essentially everything compiled for kernel mode
for Vista, as WDM in now the root of the WDM -> NTDDK -> NTIFS chain.
Unless I’m missing something, this doesn’t seem very likely, and
probably either the documentation is just incorrect, or you’re failing
to take in to account some conditional compilation constants that affect
versioning. The later can be really confusing at times, and if you have
a specific case under which it does not build, please post it, the code,
and the results as I would definitely wish to know about it.

mm

>> xxxxx@broadcom.com 2007-01-25 17:28 >>>
Hi All,
I think there is a problem/intentional change in WDM.h in WDK6000.
According to documentation [and in WDM.h with WDK5384] the
CM_PARTIAL_RESOURCE_DESCRIPTOR had the MessageInterrupt memeber as




struct {
union {
struct {
USHORT DataPayload;
USHORT MessageCount;
ULONG Vector;
ULONG_PTR MessageTargetAddress;
} Raw;
struct {
ULONG Level;
ULONG Vector;
KAFFINITY Affinity;
} Translated;
};
} MessageInterrupt;

But in WDM.h [WDK 6000] the member is changed to




struct {
union {
struct {
USHORT Reserved;
<<<<<<<<<<<<<<<<<<<<< CHANGED
USHORT MessageCount;
ULONG Vector;
KAFFINITY Affinity;
<<<<<<<<<<<<<<<<<<<<< CHANGED
} Raw;

struct {

ULONG Level;

ULONG Vector;

KAFFINITY Affinity;

} Translated;

};

} MessageInterrupt;

Hence the code that was compiling in WDK5384 will not compile on
WDK6000. If this change was intentional the help documentation not
updated which is a bit confusing.

Please advise.

Thanks,

  • Aj

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

My bad. Apparently, this one really does break things.

mm

>> xxxxx@Microsoft.com 2007-01-25 17:36 >>>
Yes, this was an intentional change. This change was made well
before the WDK shipped, 5384 is also a pretty old WDK compared to the
6000 build of the WDK. The docs typically do not talk about interim WDK
builds and how they are different from the release build of the product.
As you found out, the change is self evident when you try to compile
your driver.

d


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

I have tried to compile it in WDK 6000 and it fails.On WDK 5384 it was
ok using the same sources and everything[the compile time settings are
EXACTLY same]. But as suggested by Doron it was a intentional change by
microsoft which “does not need to be notified to developers as they will
figure it out when they compile their code”. The only thing I will say
is “thank god I was not using these two fields at too many places in my
driver”. :slight_smile:

  • Aj

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Martin O’Brien
Sent: Thursday, January 25, 2007 2:48 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Possible WDK 6000 Bug.

AJ:

Have you tried compiling it? The only reason I ask is that it sounds
like you might be basing this on inconsistencies between the
documentation and the header file. While I have seen a small handful of
what I at least at the time thought were legitimate errors, but what
your saying would break essentially everything compiled for kernel mode
for Vista, as WDM in now the root of the WDM -> NTDDK -> NTIFS chain.
Unless I’m missing something, this doesn’t seem very likely, and
probably either the documentation is just incorrect, or you’re failing
to take in to account some conditional compilation constants that affect
versioning. The later can be really confusing at times, and if you have
a specific case under which it does not build, please post it, the code,
and the results as I would definitely wish to know about it.

mm

>> xxxxx@broadcom.com 2007-01-25 17:28 >>>
Hi All,
I think there is a problem/intentional change in WDM.h in WDK6000.
According to documentation [and in WDM.h with WDK5384] the
CM_PARTIAL_RESOURCE_DESCRIPTOR had the MessageInterrupt memeber as




struct {
union {
struct {
USHORT DataPayload;
USHORT MessageCount;
ULONG Vector;
ULONG_PTR MessageTargetAddress;
} Raw;
struct {
ULONG Level;
ULONG Vector;
KAFFINITY Affinity;
} Translated;
};
} MessageInterrupt;

But in WDM.h [WDK 6000] the member is changed to




struct {
union {
struct {
USHORT Reserved;
<<<<<<<<<<<<<<<<<<<<< CHANGED
USHORT MessageCount;
ULONG Vector;
KAFFINITY Affinity;
<<<<<<<<<<<<<<<<<<<<< CHANGED
} Raw;

struct {

ULONG Level;

ULONG Vector;

KAFFINITY Affinity;

} Translated;

};

} MessageInterrupt;

Hence the code that was compiling in WDK5384 will not compile on
WDK6000. If this change was intentional the help documentation not
updated which is a bit confusing.

Please advise.

Thanks,

  • Aj

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