Archived from groups: microsoft.public.development.device.drivers,microsoft.public.win32.programmer.kernel,microsoft.public.windowsxp.device_driver.dev (More info?)
Hi
1: I just wonder if it's possible to check in an device driver, that a
system restart/shutdown has been issued by the system ?
2: I know I can get an notification by using IoRegisterShutdownNotification
but when is my ShutDown function called ?
Is it as soon a restart/shutdown har been issued or when windows think
it's time to close my driver ?
3: Can I gen a notification as soon an system restart/shutdown has bee
issued ?
I need to check in my watchdog driver if a reboot has been started to catch
any reboots/shutdowns thats failes.. (Its sometimes does)
Archived from groups: microsoft.public.development.device.drivers,microsoft.public.win32.programmer.kernel,microsoft.public.windowsxp.device_driver.dev (More info?)
Thanks...
"Maxim S. Shatskih" <maxim@storagecraft.com> wrote in message
news:eGtgN2qLEHA.2260@TK2MSFTNGP09.phx.gbl...
> > 1: I just wonder if it's possible to check in an device driver, that a
> > system restart/shutdown has been issued by the system ?
>
> Yes. The power IRP path for a System power IRP.
>
> > 2: I know I can get an notification by using
IoRegisterShutdownNotification
> > but when is my ShutDown function called ?
>
> If you're not in the disk stack - then it is called when FSDs are still
up.
> Otherwise, it is called just after cache flush, when FSD is already down.
>
> The MJ_POWER mechanism is employed only after these calls.
>
> > Is it as soon a restart/shutdown har been issued or when windows
think
> > it's time to close my driver ?
>
> Closes are not related to power management. At all.
>
> > 3: Can I gen a notification as soon an system restart/shutdown has bee
> > issued ?
>
> Yes. See answer 1.
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> maxim@storagecraft.com
> http://www.storagecraft.com >
>
You are about to answer a thread that has been inactive for more than 6 months. If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.