Re: WdfControlDeviceInitSetShutdownNotification
- From: "Doron Holan [MSFT]" <doronh@xxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 9 Oct 2007 11:53:47 -0700
why is shutdown a special case? why wouuldn't you just do it on device unload as well?
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"hammerli22" <hammerli22@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:C046FCBA-5F18-4567-8D1A-E5A0112CC559@xxxxxxxxxxxxxxxx
Hi Eliyas,
I tried using EvtDeviceD0Exit but my driver gets called when it is unloaded,
like when I am updating the driver. Is there no other to way get called back
only when
the operating system is shuting down only or is there a way to tell if the
system
is going down while i am running in EvtDeviceD0Exit so that I can ttell the
difference between the os really going down versus just being just unloaded.
thanks
Mel
"Eliyas Yakub [MSFT]" wrote:
You cannot use the DeviceInit passed to the AddDevice. This function is
meant for non plug-n-play devices. If you are writing a legacy (NT4.0)
driver then you allocate a control-deviceinit structure and use that to
register shutdown notification. For pnp-device, you don't need to use this
function. You can use EvtDeviceD0Exit - device power state
WdfPowerDeviceD3Final - to get the notification.
-Eliyas
"hammerli22" <hammerli22@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D6667A0D-37C8-47F4-B235-C38678047EE8@xxxxxxxxxxxxxxxx
> Hello,
>
> I'm trying to register my driver to recieve shut down notification when
> the
> user
> shuts the system down. I found this API for my WDF driver
>
> WdfControlDeviceInitSetShutdownNotification
>
> The question I have is do i need to create a new Device_Init structure
> using
> WdfControlDeviceInitAllocate. or can i just use the DeviceInit pass to > me
> from DeviceAdd ?
>
> Thanks
> Mel
>
.
- Follow-Ups:
- Re: WdfControlDeviceInitSetShutdownNotification
- From: hammerli22
- Re: WdfControlDeviceInitSetShutdownNotification
- References:
- Re: WdfControlDeviceInitSetShutdownNotification
- From: Eliyas Yakub [MSFT]
- Re: WdfControlDeviceInitSetShutdownNotification
- Prev by Date: Re: WdfControlDeviceInitSetShutdownNotification
- Next by Date: Re: Verifier.exe is not compatible with RtlRandom(Ex)
- Previous by thread: Re: WdfControlDeviceInitSetShutdownNotification
- Next by thread: Re: WdfControlDeviceInitSetShutdownNotification
- Index(es):
Relevant Pages
|
Loading