Expand Minimize

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

Wdfdevice.h (include Wdf.h)

Library

Wdf01000.sys (KMDF);
WUDFx02000.dll (UMDF)

IRQL

Any level

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft. All rights reserved.