// wdfdevice.h
typedef enum _WDF_POWER_DEVICE_STATE {
WdfPowerDeviceInvalid = 0,
WdfPowerDeviceD0,
WdfPowerDeviceD1,
WdfPowerDeviceD2,
WdfPowerDeviceD3,
WdfPowerDeviceD3Final,
WdfPowerDevicePrepareForHibernation,
WdfPowerDeviceMaximum
} WDF_POWER_DEVICE_STATE, *PWDF_POWER_DEVICE_STATE;
View the official Windows Driver Kit DDI reference
// wudfddi_types.h
typedef enum _WDF_POWER_DEVICE_STATE {
WdfPowerDeviceInvalid,
WdfPowerDeviceD0,
WdfPowerDeviceD1,
WdfPowerDeviceD2,
WdfPowerDeviceD3,
WdfPowerDeviceD3Final,
WdfPowerDevicePrepareForHibernation,
WdfPowerDeviceMaximum
} WDF_POWER_DEVICE_STATE, *PWDF_POWER_DEVICE_STATE;
View the official Windows Driver Kit DDI reference
No description available.
[Applies to KMDF and UMDF]
The WDF_POWER_DEVICE_STATE enumeration identifies the device power states that a device might support.
WdfPowerDeviceInvalid:0
The device power state is invalid or unknown.
WdfPowerDeviceD0
The D0 device power state.
WdfPowerDeviceD1
The D1 device power state.
WdfPowerDeviceD2
The D2 device power state.
WdfPowerDeviceD3
The D3 device power state.
WdfPowerDeviceD3Final
Represents the final time that the device enters the D3 device power state. Typically, this enumerator means that the system is being turned off, the device is about to be removed, or a resource rebalance is in progress. The device might have been already removed.
WdfPowerDevicePrepareForHibernation
The device supports hibernation files, and the system is ready to hibernate by entering system state S4. The driver must not turn off the device. For more information, see Supporting Special Files.
WdfPowerDeviceMaximum
The maximum enumerator value for this enumeration.
[Warning: UMDF 2 is the latest version of UMDF and supersedes UMDF 1. All new UMDF drivers should be written using UMDF 2. No new features are being added to UMDF 1 and there is limited support for UMDF 1 on newer versions of Windows 10. Universal Windows drivers must use UMDF 2. For more info, see Getting Started with UMDF.]
The WDF_POWER_DEVICE_STATE enumeration contains values that identify the power state that a device might support.
WdfPowerDeviceInvalid
The device power state is invalid or unknown.
WdfPowerDeviceD0
The device supports the D0 device power state.
WdfPowerDeviceD1
The device supports the D1 device power state.
WdfPowerDeviceD2
The device supports the D2 device power state.
WdfPowerDeviceD3
The device supports the D3 device power state.
WdfPowerDeviceD3Final
The final time that the device enters the D3 device power state. Typically, this value means that the computer's power is being turned off or the device is being removed from the computer. The device might have been already removed.
WdfPowerDevicePrepareForHibernation
The device supports hibernation files, and the computer is ready to hibernate by entering system state S4. The driver must not turn off the device.
WdfPowerDeviceMaximum
Valid enumeration values were exceeded.
The framework supplies one of the values of WDF_POWER_DEVICE_STATE to the IPnpCallback::OnD0Entry or IPnpCallback::OnD0Exit method to notify the UMDF driver about the power state of the device.