Hi,
I have encountered the following bug in the WinDk library V3.01:
- CChildDevice::OnPnpQueryCapabilities - busdevice.cpp
- CPnpDevice::OnPnpQueryCapabilities - PnPDevice.cpp
- CThinFilterDevice::OnPnpQueryCapabilities - ThinFilterDevice.cpp
...
// copy parent device power state mappings
RtlCopyMemory(
&pChildCapabilities->DeviceState,
&parentCapabilities.DeviceState,
BUG --> PowerDeviceMaximum * sizeof(DEVICE_POWER_STATE));
FIXED --> PowerSystemMaximum * sizeof(DEVICE_POWER_STATE));
...
Effect:
With the wrong (to small) number of DEVICE_POWER_STATE structs,
RtlCopyMemory copies not the entire DeviceState information and therefore
the Power State Mappings for the last two system states (S4 and S5) are
unspecified.
The incomplete Power State Mapping frozen my W2k system on shutdown with
the following driver stack:
+-MyDev.sys (my functional driver)
|
+-mf.sys (MS multifunction bus driver)
|
+-MyLocalBus.sys (my bus driver using CChildDevice)
|
- pci.sys (MS PCI bus driver)
However, under XP the system shut down without any problem.
Work Around
Implement in your class, derived from
CChildDevice/CPnpDevice/CThinFilterDevice, the virtual function
OnPnpQueryCapabilities with the fixed size.
By the way, do you know a news group, FAQ or something else for WinDk
related topics?
I'm afraid that Bsquare canceled WinDk 
Greetings,
Dieter
Dieter Schmidt, Standard-Software Design
MEN Mikro Elektronik GmbH
Neuwieder Straße 7
90411 Nuremberg, Germany
Phone +49-911-99 33 5-68
Fax +49-911-99 33 5-99
E-Mail xxxxx@men.de
www.men.de
sorry, I was too fast:
the bug applies only to CChildDevice::OnPnpQueryCapabilities.
:)Dieter
Hi,
I have encountered the following bug in the WinDk library V3.01:
- CChildDevice::OnPnpQueryCapabilities - busdevice.cpp
- CPnpDevice::OnPnpQueryCapabilities - PnPDevice.cpp
- CThinFilterDevice::OnPnpQueryCapabilities - ThinFilterDevice.cpp
…
// copy parent device power state mappings
RtlCopyMemory(
&pChildCapabilities->DeviceState,
&parentCapabilities.DeviceState,
BUG –> PowerDeviceMaximum * sizeof(DEVICE_POWER_STATE));
FIXED –> PowerSystemMaximum * sizeof(DEVICE_POWER_STATE));
…
Effect:
With the wrong (to small) number of DEVICE_POWER_STATE structs,
RtlCopyMemory copies not the entire DeviceState information and therefore
the Power State Mappings for the last two system states (S4 and S5) are
unspecified.
The incomplete Power State Mapping frozen my W2k system on shutdown with
the following driver stack:
±MyDev.sys (my functional driver)
|
±mf.sys (MS multifunction bus driver)
|
±MyLocalBus.sys (my bus driver using CChildDevice)
|
- pci.sys (MS PCI bus driver)
However, under XP the system shut down without any problem.
Work Around
Implement in your class, derived from
CChildDevice/CPnpDevice/CThinFilterDevice, the virtual function
OnPnpQueryCapabilities with the fixed size.
By the way, do you know a news group, FAQ or something else for WinDk
related topics?
I’m afraid that Bsquare canceled WinDk 
Greetings,
Dieter
Dieter Schmidt, Standard-Software Design
MEN Mikro Elektronik GmbH
Neuwieder Straße 7
90411 Nuremberg, Germany
Phone +49-911-99 33 5-68
Fax +49-911-99 33 5-99
E-Mail xxxxx@men.de
www.men.de
BSquare has indeed killed the WinDK product.
–
Bill McKenzie
Compuware Corporation
http://www.compuware.com/products/driverstudio/
wrote in message news:xxxxx@ntdev…
>
> Hi,
>
> I have encountered the following bug in the WinDk library V3.01:
>
> - CChildDevice::OnPnpQueryCapabilities - busdevice.cpp
> - CPnpDevice::OnPnpQueryCapabilities - PnPDevice.cpp
> - CThinFilterDevice::OnPnpQueryCapabilities - ThinFilterDevice.cpp
>
> …
> // copy parent device power state mappings
> RtlCopyMemory(
> &pChildCapabilities->DeviceState,
> &parentCapabilities.DeviceState,
> BUG –> PowerDeviceMaximum * sizeof(DEVICE_POWER_STATE));
> FIXED –> PowerSystemMaximum * sizeof(DEVICE_POWER_STATE));
> …
>
>
> Effect:
> -------
> With the wrong (to small) number of DEVICE_POWER_STATE structs,
> RtlCopyMemory copies not the entire DeviceState information and therefore
> the Power State Mappings for the last two system states (S4 and S5) are
> unspecified.
>
> The incomplete Power State Mapping frozen my W2k system on shutdown with
> the following driver stack:
>
> ±MyDev.sys (my functional driver)
> |
> ±mf.sys (MS multifunction bus driver)
> |
> ±MyLocalBus.sys (my bus driver using CChildDevice)
> |
> + pci.sys (MS PCI bus driver)
>
> However, under XP the system shut down without any problem.
>
>
> Work Around
> -----------
> Implement in your class, derived from
> CChildDevice/CPnpDevice/CThinFilterDevice, the virtual function
> OnPnpQueryCapabilities with the fixed size.
>
>
> By the way, do you know a news group, FAQ or something else for WinDk
> related topics?
>
> I’m afraid that Bsquare canceled WinDk 
>
> Greetings,
> Dieter
>
> Dieter Schmidt, Standard-Software Design
> MEN Mikro Elektronik GmbH
> Neuwieder Straße 7
> 90411 Nuremberg, Germany
> Phone +49-911-99 33 5-68
> Fax +49-911-99 33 5-99
> E-Mail xxxxx@men.de
> www.men.de
>
>
>
>