// wdfdevice.h
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;
View the official Windows Driver Kit DDI referenceNo description available.
[Applies to KMDF and UMDF]
The WDF_DEVICE_STATE structure specifies a device's Plug and Play state.
SizeThe size, in bytes, of this structure.
DisabledA 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.
DontDisplayInUIA 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.)
FailedA WDF_TRI_STATE-typed value that, if set to WdfTrue, indicates that the device is present but has failed.
NotDisableableA WDF_TRI_STATE-typed value that, if set to WdfTrue, indicates that the device cannot be disabled.
RemovedA WDF_TRI_STATE-typed value that, if set to WdfTrue, indicates that the device has been removed.
ResourcesChangedA WDF_TRI_STATE-typed value that, if set to WdfTrue, indicates that the device's resource requirements have changed.
AssignedToGuestA WDF_TRI_STATE-typed value that, if set to WdfTrue, indicates that the device is reporting itself as assigned to a guest partition.
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.