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
展開 最小化

WdfDeviceAssignS0IdleSettings メソッド

The WdfDeviceAssignS0IdleSettings method provides driver-supplied information that the framework uses when a device is idle and the system is in its working (S0) state.

構文

NTSTATUS WdfDeviceAssignS0IdleSettings(
  [in]  WDFDEVICE Device,
  [in]  PWDF_DEVICE_POWER_POLICY_IDLE_SETTINGS Settings
);

パラメーター

Device [in]

A handle to a framework device object.

Settings [in]

A pointer to a caller-supplied WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS structure.

戻り値

If the operation succeeds, WdfDeviceAssignS0IdleSettings returns STATUS_SUCCESS. Additional return values include:

リターン コード説明
STATUS_INVALID_DEVICE_REQUEST

The calling driver is not the device's power policy owner.

STATUS_INVALID_PARAMETER

An invalid Settings value is detected.

STATUS_INFO_LENGTH_MISMATCH

The size of the WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS structure is incorrect.

STATUS_POWER_STATE_INVALID

The WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS structure contains an invalid device power state; or the IdleCaps member of the WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS structure indicates the device can wake itself, but the bus driver indicates the device cannot wake itself.

 

The method might return other NTSTATUS values.

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

解説

For more information, see Supporting Idle Power-Down.

The following code example initializes a WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS structure, sets an idle time-out value of 10 seconds, and calls WdfDeviceAssignS0IdleSettings.

WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS  idleSettings;
NTSTATUS  status = STATUS_SUCCESS;

WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS_INIT(
                                           &idleSettings,
                                           IdleCanWakeFromS0
                                           );
idleSettings.IdleTimeout = 10000;

status = WdfDeviceAssignS0IdleSettings(
                                       device,
                                       &idleSettings
                                       );
if (!NT_SUCCESS(status)) {
    return status;
}

要件

バージョン

Available in version 1.0 and later versions of KMDF.

ヘッダー

Wdfdevice.h (includeWdf.h)

ライブラリ

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

IRQL

<= DISPATCH_LEVEL

参照

WdfDeviceAssignSxWakeSettings
WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS

 

 

コミュニティの追加

追加
表示:
© 2015 Microsoft