EVT_WDF_DEVICE_SHUTDOWN_NOTIFICATION callback function (wdfcontrol.h)

[Applies to KMDF only]

A driver's EvtDeviceShutdownNotification event callback function notifies the driver that the system is about to lose its power.

Syntax

EVT_WDF_DEVICE_SHUTDOWN_NOTIFICATION EvtWdfDeviceShutdownNotification;

void EvtWdfDeviceShutdownNotification(
  WDFDEVICE Device
)
{...}

Parameters

Device

[in] A handle to a framework device object that the driver initialized by calling WdfControlDeviceInitAllocate.

Return value

None

Remarks

To register an EvtDeviceShutdownNotification event callback function, a driver must call WdfControlDeviceInitSetShutdownNotification. Only drivers that create control device objects can register this callback function.

The framework calls a driver's EvtDeviceShutdownNotification event callback function if the user is about to turn off the computer, or if the computer suddenly loses its power and an emergency power supply, such as an uninterruptible power supply (UPS), is available to safely turn off the computer.

For more information about control device objects and the EvtDeviceShutdownNotification callback function see Using Control Device Objects.

Requirements

   
Target Platform Universal
Minimum KMDF version 1.0
Header wdfcontrol.h (include Wdf.h)
IRQL PASSIVE_LEVEL

See also

WdfControlDeviceInitAllocate

WdfControlDeviceInitSetShutdownNotification