Bewerken

Delen via


WDF_DEVICE_FAILED_ACTION enumeration (wdfdevice.h)

[Applies to KMDF and UMDF]

The WDF_DEVICE_FAILED_ACTION enumeration identifies the action that the framework will take when a driver reports an unrecoverable software or hardware failure.

Syntax

typedef enum _WDF_DEVICE_FAILED_ACTION {
  WdfDeviceFailedUndefined = 0,
  WdfDeviceFailedAttemptRestart,
  WdfDeviceFailedNoRestart
} WDF_DEVICE_FAILED_ACTION;

Constants

 
WdfDeviceFailedUndefined
Value: 0
For internal use only.
WdfDeviceFailedAttemptRestart
Supported in KMDF and starting in UMDF version 2.15. If the device's drivers are not supporting other devices that are plugged into the computer, the I/O manager unloads the drivers. Next, the Plug and Play manager attempts to restart the device by requesting the bus driver to reenumerate its devices. If the bus driver supports reenumeration, your driver will be reloaded, if it was unloaded. If several consecutive restart attempts fail (because the restarted driver again reports an error), the framework stops trying to restart the device.
WdfDeviceFailedNoRestart
If the device's drivers are not supporting other devices on the system, the I/O manager unloads the drivers.

Remarks

The WDF_DEVICE_FAILED_ACTION enumeration is used as an input argument to WdfDeviceSetFailed.

Drivers typically specify WdfDeviceFailedAttemptRestart if they encounter an unrecoverable software error, because specifying this enumerator reloads the drivers. A driver might specify WdfDeviceFailedNoRestart if it encounters an unrecoverable hardware error that affects all of the driver's devices.

For information about specifying WdfDeviceFailedAttemptRestart in a UMDF driver, see the Remarks of WdfDeviceSetFailed.

Requirements

Requirement Value
Minimum KMDF version 1.0
Minimum UMDF version 2.0
Header wdfdevice.h (include Wdf.h)

See also

WdfDeviceSetFailed