Discussion:
Windows restart notification to device driver
(too old to reply)
Rcrj
2009-08-06 01:48:39 UTC
Permalink
Hi,
I have a USB device which should be powered down when the Window
system reboots. I have registered for power state change callbacks fo
doing the same. But the power change callbacks are not getting called o
shutdown/restart (I see these callbacks getting called only fo
Hibernate). And the USB device never gets powered down. This leads t
hang when the Windows PC tries to boot after the reboot. Would yo
please let me know of any callbacks that are available for RESTAR
notification to device drivers.


Regards,
Raj

--
Rcr
-----------------------------------------------------------------------
Rcrj's Profile: http://forums.techarena.in/members/121848.ht
View this thread: http://forums.techarena.in/windows-device-drivers/1227086.ht

http://forums.techarena.i
Doron Holan [MSFT]
2009-08-06 18:14:29 UTC
Permalink
the driver itself will receive an IRP_MJ_POWER irp that tells it the
intended system power state (or EvtDeviceD0Entry if it is KMDF). handle the
IRP correctly and the device will power down

d
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Hi,
I have a USB device which should be powered down when the Windows
system reboots. I have registered for power state change callbacks for
doing the same. But the power change callbacks are not getting called on
shutdown/restart (I see these callbacks getting called only for
Hibernate). And the USB device never gets powered down. This leads to
hang when the Windows PC tries to boot after the reboot. Would you
please let me know of any callbacks that are available for RESTART
notification to device drivers.
Regards,
Raja
--
Rcrj
------------------------------------------------------------------------
Rcrj's Profile: http://forums.techarena.in/members/121848.htm
http://forums.techarena.in/windows-device-drivers/1227086.htm
http://forums.techarena.in
Rcrj
2009-08-09 17:10:36 UTC
Permalink
Hi,
Thanks for the reply.

Im using the "WdfDeviceInitSetPnpPowerEventCallbacks" for registerin
for power state change callbacks. For example, Im registering with th
foll:
.EvtDevicePrepareHardware, EvtDeviceReleaseHardware, EvtDeviceD0Entry
EvtDeviceD0Exit, EvtDeviceQueryRemove, EvtDeviceQueryStop.

And I do get the callbacks called for Hibernate. But not for shutdow
or restart.


Regards,
Raj

--
Rcr
-----------------------------------------------------------------------
Rcrj's Profile: http://forums.techarena.in/members/121848.ht
View this thread: http://forums.techarena.in/windows-device-drivers/1227086.ht

http://forums.techarena.i
Doron Holan [MSFT]
2009-08-17 18:31:06 UTC
Permalink
you will absolutely get D0Exit called for hiber, shutdown AND restart.

d
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Post by Rcrj
Hi,
Thanks for the reply.
Im using the "WdfDeviceInitSetPnpPowerEventCallbacks" for registering
for power state change callbacks. For example, Im registering with the
EvtDevicePrepareHardware, EvtDeviceReleaseHardware, EvtDeviceD0Entry,
EvtDeviceD0Exit, EvtDeviceQueryRemove, EvtDeviceQueryStop.
And I do get the callbacks called for Hibernate. But not for shutdown
or restart.
Regards,
Raja
--
Rcrj
------------------------------------------------------------------------
Rcrj's Profile: http://forums.techarena.in/members/121848.htm
http://forums.techarena.in/windows-device-drivers/1227086.htm
http://forums.techarena.in
Loading...