WDF_RELEASE_HARDWARE_ORDER_ON_FAILURE - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// 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 reference

NtDoc

No description available.

Windows Driver Kit DDI reference (ne-wdfdevice-_wdf_release_hardware_order_on_failure)

_WDF_RELEASE_HARDWARE_ORDER_ON_FAILURE enumeration

Description

[Applies to KMDF and UMDF]

The WDF_RELEASE_HARDWARE_ORDER_ON_FAILURE enumeration specifies when the framework calls a driver's EvtDeviceReleaseHardware callback function.

Constants

WdfReleaseHardwareOrderOnFailureInvalid:0

Reserved for system use.

WdfReleaseHardwareOrderOnFailureEarly

Except 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.

WdfReleaseHardwareOrderOnFailureAfterDescendants

The framework always calls the driver's EvtDeviceReleaseHardware callback function after it has called the EvtDeviceReleaseHardware function for all child devices that the driver enumerates.

Remarks

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.

See also

EvtDeviceReleaseHardware

WdfDeviceInitSetReleaseHardwareOrderOnFailure