// wdfdevice.h
typedef enum _WDF_RELEASE_HARDWARE_ORDER_ON_FAILURE {
WdfReleaseHardwareOrderOnFailureInvalid = 0,
WdfReleaseHardwareOrderOnFailureEarly,
WdfReleaseHardwareOrderOnFailureAfterDescendants
} WDF_RELEASE_HARDWARE_ORDER_ON_FAILURE, *PWDF_RELEASE_HARDWARE_ORDER_ON_FAILURE;
View the official Windows Driver Kit DDI referenceNo description available.
[Applies to KMDF and UMDF]
The WDF_RELEASE_HARDWARE_ORDER_ON_FAILURE enumeration specifies when the framework calls a driver's EvtDeviceReleaseHardware callback function.
WdfReleaseHardwareOrderOnFailureInvalid:0Reserved for system use.
WdfReleaseHardwareOrderOnFailureEarlyExcept under certain error conditions, the framework calls the driver's EvtDeviceReleaseHardware callback function after it has called the EvtDeviceReleaseHardware function for all child devices that the driver enumerates. For more information, see Remarks.
WdfReleaseHardwareOrderOnFailureAfterDescendantsThe framework always calls the driver's EvtDeviceReleaseHardware callback function after it has called the EvtDeviceReleaseHardware function for all child devices that the driver enumerates.
The WDF_RELEASE_HARDWARE_ORDER_ON_FAILURE enumeration is used as input to WdfDeviceInitSetReleaseHardwareOrderOnFailure.
If a driver specifies WdfReleaseHardwareOrderOnFailureEarly, then in normal device removal, the framework calls the driver's EvtDeviceReleaseHardware after it has called the EvtDeviceReleaseHardware function for all child devices that the driver enumerates. However, in the event of a device power-up or power-down failure, the framework might call the driver's EvtDeviceReleaseHardware before it has called the EvtDeviceReleaseHardware functions for all child devices.
If a driver specifies WdfReleaseHardwareOrderOnFailureAfterDescendants, then the framework waits to call the driver's EvtDeviceReleaseHardware until it has called the EvtDeviceReleaseHardware functions of the child devices.
WdfDeviceInitSetReleaseHardwareOrderOnFailure