WdfDevStateNormalize method
[Applies to KMDF and UMDF]
The WdfDevStateNormalize method removes extra bits from a specified framework state machine value so that the driver can use the value as an index into an array of machine states.
Syntax
ULONG WdfDevStateNormalize(
[in] ULONG State
);
Parameters
- State [in]
-
A state machine value that is returned from WdfDeviceGetDevicePnpState, WdfDeviceGetDevicePowerState, or WdfDeviceGetDevicePowerPolicyState.
Return value
WdfDevStateNormalize returns the specified State value with extra bits removed.
Examples
The following code example obtains the current state of the framework's Plug and Play state machine and then removes extra bits from the state value.
WDF_DEVICE_PNP_STATE PnpState; ULONG normalizedState; PnpState = WdfDeviceGetDevicePnpState(device); normalizedState = WdfDevStateNormalize(PnpState);
Requirements
Minimum KMDF version | 1.0 |
---|---|
Minimum UMDF version | 2.0 |
Header |
|
Library |
|
IRQL | Any level |
Show: