EvtDeviceReportedMissing
EvtDeviceUsageNotificationEx
EvtDeviceWdmIrpDispatch
EvtDeviceWdmPostPoFxRegisterDevice
EvtDeviceWdmPrePoFxUnregisterDevice
WDF_DEVICE_INTERFACE_PROPERTY_DATA
WDF_DEVICE_INTERFACE_PROPERTY_DATA_INIT
WDF_DEVICE_PROPERTY_DATA
WDF_DEVICE_PROPERTY_DATA_INIT
WDF_DISPATCH_IRP_TO_IO_QUEUE_FLAGS
WDF_EVENT_TYPE
WDF_IO_TYPE_CONFIG
WDF_IO_TYPE_CONFIG_INIT
WDF_POWER_FRAMEWORK_SETTINGS
WDF_POWER_FRAMEWORK_SETTINGS_INIT
WDF_POWER_POLICY_IDLE_TIMEOUT_TYPE
WDF_RELEASE_HARDWARE_ORDER_ON_FAILURE
WDF_REMOVE_LOCK_OPTIONS
WDF_REMOVE_LOCK_OPTIONS_FLAGS
WDF_REMOVE_LOCK_OPTIONS_INIT
WdfDeviceAllocAndQueryInterfaceProperty method
WdfDeviceAllocAndQueryPropertyEx method
WdfDeviceAssignInterfaceProperty method
WdfDeviceAssignProperty method
WdfDeviceConfigureWdmIrpDispatchCallback method
WdfDeviceGetDeviceStackIoType method
WdfDeviceGetHardwareRegisterMappedAddress
WdfDeviceInitSetIoTypeEx method
WdfDeviceInitSetReleaseHardwareOrderOnFailure method
WdfDeviceInitSetRemoveLockOptions method
WdfDeviceMapIoSpace
WdfDeviceOpenDevicemapKey method
WdfDevicePostEvent
WdfDeviceQueryInterfaceProperty method
WdfDeviceQueryPropertyEx method
WdfDeviceReadFromHardware
WdfDeviceResumeIdleWithTag method
WdfDeviceStopIdleWithTag method
WdfDeviceUnmapIoSpace
WdfDeviceWdmAssignPowerFrameworkSettings method
WdfDeviceWdmDispatchIrp method
WdfDeviceWdmDispatchIrpToIoQueue method
WdfDeviceWriteToHardware
WdfFdoInitAllocAndQueryPropertyEx method
WdfFdoInitQueryPropertyEx method
展开 最小化

EvtDevicePowerPolicyStateChange

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

语法

EVT_WDF_DEVICE_POWER_POLICY_STATE_CHANGE_NOTIFICATION EvtDevicePowerPolicyStateChange;

VOID EvtDevicePowerPolicyStateChange(
  __in  WDFDEVICE Device,
  __in  PCWDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA NotificationData
)
{ ... }

参数

Device [in]

A handle to a framework device object.

NotificationData [in]

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

返回值

None

评论

To register an EvtDevicePowerPolicyStateChange callback function, a driver must call WdfDeviceInitRegisterPowerPolicyStateChangeCallback.

Most drivers do not need to be notified when the framework's power policy state machine changes state. For more information, see State Machines in the Framework.

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

示例

The function type is declared in Wdfdevice.h, as follows.

typedef VOID
 (EVT_WDF_DEVICE_POWER_STATE_CHANGE_NOTIFICATION)(
    WDFDEVICE  Device,
    PCWDF_DEVICE_POWER_NOTIFICATION_DATA  NotificationData
    );

To define an EvtDevicePowerPolicyStateChange callback function that is named MyDevicePowerPolicyStateChange, you must first provide a function declaration that SDV and other verification tools require, as follows:

EVT_WDF_DEVICE_POWER_POLICY_STATE_CHANGE_NOTIFICATION  MyDevicePowerPolicyStateChange;

Then, implement your callback function as follows:

VOID
 MyDevicePowerPolicyStateChange (
    WDFDEVICE  Device,
    PCWDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA  NotificationData
 )
 {...}

要求

版本

Supported by version 1.0 and later versions of KMDF.

标头

Wdfdevice.h (包括Wdf.h)

IRQL

PASSIVE_LEVEL

另请参见

EvtDevicePnpStateChange
EvtDevicePowerStateChange

 

 

社区附加资源

添加
显示:
© 2015 Microsoft