And needless to say, the samples will be fixed for v.next of KMDF
Thx
d
-----Original Message-----
From: Doron Holan
Sent: Thursday, June 08, 2006 4:18 PM
To: ‘Windows System Software Devs Interest List’
Subject: RE: [ntdev] KMDF Minor Whoops
WDF_POWER_DEVICE_STATE is the correct enum for D0Entry()/Exit(). I
created both names, so you can yell at me ;)…there is a reason behind
the similar names actually. We initially had WDF_DEVICE_POWER_STATE for
the power state machine states. We then realized we needed
WDF_POWER_DEVICE_STATE to map to D0->D3 + extra contextual states for
real power states (like d3 final and D3 but not really b/c you are in
the hiber path). We couldn’t rename the state machine enum begin it was
already in use, so I picked the next best (or worst I guess
) thing.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tim Roberts
Sent: Thursday, June 08, 2006 4:09 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] KMDF Minor Whoops
Hmm, I’ve found an interesting (but minor) issue in KMDF 1.1.
Both EvtDeviceD0Entry and EvtDeviceD0Exit are documented and prototyped
as taking a WDF_POWER_DEVICE_STATE. However, the PLX9x5x sample defines
its EvtDeviceD0Ext handler as taking a WDF_DEVICE_POWER_STATE instead,
and the values it tests against really are from WDF_DEVICE_POWER_STATE,
not from WDF_POWER_DEVICE_STATE.
Both of those are enumerations. Thus, in C, they are compatible types,
and the compiler doesn’t complain about the mismatch. I happened to be
using the PLX9x5x driver as a base, but I’m compiling with C++, where it
complained about it.
I can’t guess which one is actually correct. The enumerations are very
different, so the values aren’t compatible. Either the sample is wrong,
or the doc and the include file are wrong.
And whoever created both WDF_DEVICE_POWER_STATE and
WDF_POWER_DEVICE_STATE should be forced to rewrite Minesweeper in Cobol.
–
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