EvtDeviceReportedMissing
EvtDeviceUsageNotificationEx
EvtDeviceWdmIrpDispatch
EvtDeviceWdmPostPoFxRegisterDevice
EvtDeviceWdmPrePoFxUnregisterDevice
WDF_DEVICE_INTERFACE_PROPERTY_DATA
WDF_DEVICE_INTERFACE_PROPERTY_DATA_INIT
WDF_DEVICE_PROPERTY_DATA
WDF_DEVICE_PROPERTY_DATA_INIT
WDF_DISPATCH_IRP_TO_IO_QUEUE_FLAGS
WDF_EVENT_TYPE
WDF_IO_TYPE_CONFIG
WDF_IO_TYPE_CONFIG_INIT
WDF_POWER_FRAMEWORK_SETTINGS
WDF_POWER_FRAMEWORK_SETTINGS_INIT
WDF_POWER_POLICY_IDLE_TIMEOUT_TYPE
WDF_RELEASE_HARDWARE_ORDER_ON_FAILURE
WDF_REMOVE_LOCK_OPTIONS
WDF_REMOVE_LOCK_OPTIONS_FLAGS
WDF_REMOVE_LOCK_OPTIONS_INIT
WdfDeviceAllocAndQueryInterfaceProperty method
WdfDeviceAllocAndQueryPropertyEx method
WdfDeviceAssignInterfaceProperty method
WdfDeviceAssignProperty method
WdfDeviceConfigureWdmIrpDispatchCallback method
WdfDeviceGetDeviceStackIoType method
WdfDeviceGetHardwareRegisterMappedAddress
WdfDeviceInitSetIoTypeEx method
WdfDeviceInitSetReleaseHardwareOrderOnFailure method
WdfDeviceInitSetRemoveLockOptions method
WdfDeviceMapIoSpace
WdfDeviceOpenDevicemapKey method
WdfDevicePostEvent
WdfDeviceQueryInterfaceProperty method
WdfDeviceQueryPropertyEx method
WdfDeviceReadFromHardware
WdfDeviceResumeIdleWithTag method
WdfDeviceStopIdleWithTag method
WdfDeviceUnmapIoSpace
WdfDeviceWdmAssignPowerFrameworkSettings method
WdfDeviceWdmDispatchIrp method
WdfDeviceWdmDispatchIrpToIoQueue method
WdfDeviceWriteToHardware
WdfFdoInitAllocAndQueryPropertyEx method
WdfFdoInitQueryPropertyEx method
Collapse the table of content
Expand the table of content
展开 最小化

WdfDeviceGetDevicePowerState 方法

The WdfDeviceGetDevicePowerState method returns the current state of the framework's power state machine, for a specified device.

语法

WDF_DEVICE_POWER_STATE WdfDeviceGetDevicePowerState(
  [in]  WDFDEVICE Device
);

参数

Device [in]

A handle to a framework device object.

返回值

WdfDeviceGetDevicePowerState returns a WDF_DEVICE_POWER_STATE-typed enumerator that identifies the current state of the framework's power 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 power state machine. For more information about the framework's state machines, see State Machines in the Framework.

The WdfDeviceGetDevicePowerState method returns a meaningful value only if it is called from within the following callback functions:

示例

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

WDF_DEVICE_POWER_STATE state;

state = WdfDeviceGetDevicePowerState(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

另请参见

WdfDeviceGetDevicePnpState
WdfDeviceGetDevicePowerPolicyState
WdfDevStateNormalize

 

 

社区附加资源

添加
显示:
© 2015 Microsoft