// 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 referenceNo description available.
[Applies to KMDF and UMDF]
The WDF_POWER_DEVICE_STATE enumeration identifies the device power states that a device might support.
WdfPowerDeviceInvalid:0The device power state is invalid or unknown.
WdfPowerDeviceD0The D0 device power state.
WdfPowerDeviceD1The D1 device power state.
WdfPowerDeviceD2The D2 device power state.
WdfPowerDeviceD3The D3 device power state.
WdfPowerDeviceD3FinalRepresents 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.
WdfPowerDevicePrepareForHibernationThe 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.
WdfPowerDeviceMaximumThe 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.
WdfPowerDeviceInvalidThe device power state is invalid or unknown.
WdfPowerDeviceD0The device supports the D0 device power state.
WdfPowerDeviceD1The device supports the D1 device power state.
WdfPowerDeviceD2The device supports the D2 device power state.
WdfPowerDeviceD3The device supports the D3 device power state.
WdfPowerDeviceD3FinalThe 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.
WdfPowerDevicePrepareForHibernationThe device supports hibernation files, and the computer is ready to hibernate by entering system state S4. The driver must not turn off the device.
WdfPowerDeviceMaximumValid 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.