信息
您所需的主题如下所示。但此主题未包含在此库中。

WdfDeviceGetDevicePnpState 方法

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

语法

WDF_DEVICE_PNP_STATE WdfDeviceGetDevicePnpState(
  [in]  WDFDEVICE Device
);

参数

Device [in]

A handle to a framework device object.

返回值

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.

评论

Most drivers do not need to be aware of the state of the framework's Plug and Play state machine. For more information about the framework's state machines, see State Machines in the Framework.

示例

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);

要求

版本

Available in version 1.0 and later versions of KMDF.

标头

Wdfdevice.h (包括Wdf.h)

Wdf<MajorVersionNumber>000.sys (see Framework Library Versions.)

IRQL

<= DISPATCH_LEVEL

另请参见

WdfDeviceGetDevicePowerPolicyState
WdfDeviceGetDevicePowerState
WdfDevStateNormalize

 

 

社区附加资源

显示:
© 2014 Microsoft