EVT_WDF_DEVICE_POWER_STATE_CHANGE_NOTIFICATION callback function (wdfdevice.h)

[Applies to KMDF only]

Note

This callback function is for Microsoft-internal use only.

A driver's EvtDevicePowerStateChange event callback function informs the driver that a device's power state machine is moving from one state to another.

Syntax

EVT_WDF_DEVICE_POWER_STATE_CHANGE_NOTIFICATION EvtWdfDevicePowerStateChangeNotification;

void EvtWdfDevicePowerStateChangeNotification(
  [in] WDFDEVICE Device,
  [in] PCWDF_DEVICE_POWER_NOTIFICATION_DATA NotificationData
)
{...}

Parameters

[in] Device

A handle to a framework device object.

[in] NotificationData

A pointer to a framework-supplied WDF_DEVICE_POWER_NOTIFICATION_DATA structure that identifies the state machine's old and new states.

Return value

None

Remarks

To register an EvtDevicePowerStateChange callback function, a driver must call WdfDeviceInitRegisterPowerStateChangeCallback.

For more information, see State Machines in the Framework.

If the EvtDevicePowerStateChange callback function calls WdfDeviceStopIdle with the WaitForD0 parameter set to TRUE, the framework's power state machine will become deadlocked.

Requirements

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

See also

EvtDevicePnpStateChange

EvtDevicePowerPolicyStateChange