WDF_DEVICE_STATE structure (wdfdevice.h)

[Applies to KMDF and UMDF]

The WDF_DEVICE_STATE structure specifies a device's Plug and Play state.

Syntax

typedef struct _WDF_DEVICE_STATE {
  ULONG         Size;
  WDF_TRI_STATE Disabled;
  WDF_TRI_STATE DontDisplayInUI;
  WDF_TRI_STATE Failed;
  WDF_TRI_STATE NotDisableable;
  WDF_TRI_STATE Removed;
  WDF_TRI_STATE ResourcesChanged;
  WDF_TRI_STATE AssignedToGuest;
} WDF_DEVICE_STATE, *PWDF_DEVICE_STATE;

Members

Size

The size, in bytes, of this structure.

Disabled

A WDF_TRI_STATE-typed value that, if set to WdfTrue, indicates that the device is disabled. For more information about the WDF_TRI_STATE type, see the following Remarks section.

DontDisplayInUI

A WDF_TRI_STATE-typed value that, if set to WdfTrue, indicates that the device is hidden (not displayed) in Device Manager. For more information, see Viewing Hidden Devices. (After you set this member to WdfTrue, changing its value has no effect.)

Failed

A WDF_TRI_STATE-typed value that, if set to WdfTrue, indicates that the device is present but has failed.

NotDisableable

A WDF_TRI_STATE-typed value that, if set to WdfTrue, indicates that the device cannot be disabled.

Removed

A WDF_TRI_STATE-typed value that, if set to WdfTrue, indicates that the device has been removed.

ResourcesChanged

A WDF_TRI_STATE-typed value that, if set to WdfTrue, indicates that the device's resource requirements have changed.

AssignedToGuest

A WDF_TRI_STATE-typed value that, if set to WdfTrue, indicates that the device is reporting itself as assigned to a guest partition.

Remarks

Structure members use the WDF_TRI_STATE type. A value of WdfUseDefault indicates the framework will use the value that was provided by a lower driver in the stack. For example, if a bus driver specifies WdfTrue for NotDisableable and the device's function driver specifies WdfUseDefault, the framework uses WdfTrue for the device state.

The WDF_DEVICE_STATE structure is used as a parameter to WdfDeviceSetDeviceState and WdfDeviceGetDeviceState.

To initialize a WDF_DEVICE_STATE structure, the driver must call WDF_DEVICE_STATE_INIT.

For more information about the members of the WDF_DEVICE_STATE structure, see PNP_DEVICE_STATE.

Requirements

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