WdfDeviceGetDeviceState method
[Applies to KMDF and UMDF]
The WdfDeviceGetDeviceState method retrieves the device state for a specified device.
Syntax
VOID WdfDeviceGetDeviceState(
[in] WDFDEVICE Device,
[out] PWDF_DEVICE_STATE DeviceState
);
Parameters
- Device [in]
-
A handle to a framework device object.
- DeviceState [out]
-
A pointer to a caller-allocated WDF_DEVICE_STATE structure that receives the device's state information.
Return value
None.
A bug check occurs if the driver supplies an invalid object handle.
Examples
The following code example initializes a WDF_DEVICE_STATE structure and then obtains a specified device's state.
WDF_DEVICE_STATE deviceState;
WDF_DEVICE_STATE_INIT (&deviceState);
WdfDeviceGetDeviceState (
Device,
&deviceState
);
Requirements
|
Minimum KMDF version | 1.0 |
|---|---|
|
Minimum UMDF version | 2.0 |
|
Header |
|
|
Library |
|
|
IRQL | <= DISPATCH_LEVEL |
|
DDI compliance rules | DriverCreate, KmdfIrql, KmdfIrql2 |
See also
Show:
