WdfDeviceGetDevicePnpState function (wdfdevice.h)

[Applies to KMDF only]

Note

This function is for Microsoft-internal use only.

The WdfDeviceGetDevicePnpState method returns the current state of the framework's Plug and Play state machine for a specified device.

Syntax

WDF_DEVICE_PNP_STATE WdfDeviceGetDevicePnpState(
  [in] WDFDEVICE Device
);

Parameters

[in] Device

A handle to a framework device object.

Return value

WdfDeviceGetDevicePnpState returns a WDF_DEVICE_PNP_STATE-typed enumerator that identifies the current state of the framework's Plug and Play state machine for the specified device.

A bug check occurs if the driver supplies an invalid object handle.

Remarks

For more information about the framework's state machines, see State Machines in the Framework.

Examples

The following code example obtains the current state of the framework's Plug and Play state machine for a specified device.

WDF_DEVICE_PNP_STATE state;

state = WdfDeviceGetDevicePnpState(Device);

Requirements

Requirement Value
Target Platform Universal
Minimum KMDF version 1.0
Header wdfdevice.h (include Wdf.h)
Library Wdf01000.sys (see Framework Library Versioning.)
IRQL <= DISPATCH_LEVEL
DDI compliance rules DriverCreate(kmdf), KmdfIrql(kmdf), KmdfIrql2(kmdf), KmdfIrqlExplicit(kmdf)

See also

WdfDevStateNormalize

WdfDeviceGetDevicePowerPolicyState

WdfDeviceGetDevicePowerState