EVT_WDF_DEVICE_ARM_WAKE_FROM_SX_WITH_REASON - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wdfdevice.h

EVT_WDF_DEVICE_ARM_WAKE_FROM_SX_WITH_REASON EvtWdfDeviceArmWakeFromSxWithReason;

NTSTATUS EvtWdfDeviceArmWakeFromSxWithReason(
  [in] WDFDEVICE Device,
  [in] BOOLEAN DeviceWakeEnabled,
  [in] BOOLEAN ChildrenArmedForWake
)
{...}
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nc-wdfdevice-evt_wdf_device_arm_wake_from_sx_with_reason)

EVT_WDF_DEVICE_ARM_WAKE_FROM_SX_WITH_REASON callback function

Description

[Applies to KMDF and UMDF]

A driver's EvtDeviceArmWakeFromSxWithReason event callback function arms (that is, enables) a device so that it can trigger a wake signal while in a low-power device state. The wake signal causes the device to enter its working state (D0) and causes the system to enter its working state (S0).

Parameters

Device [in]

A handle to a framework device object.

DeviceWakeEnabled [in]

A Boolean value that, if TRUE, indicates that the device's ability to wake the system is enabled.

ChildrenArmedForWake [in]

A Boolean value that, if TRUE, indicates that the ability of one or more child devices to wake the system is enabled.

Return value

If the EvtDeviceArmWakeFromSxWithReason callback function encounters no error, it must return STATUS_SUCCESS or another status value for which NT_SUCCESS(status) equals TRUE. Otherwise it must return a status value for which NT_SUCCESS(status) equals FALSE.

If NT_SUCCESS(status) equals FALSE, the framework calls the driver's EvtDeviceDisarmWakeFromSx callback function. (The framework does not report a device failure to the PnP manager.)

Remarks

Version 1.7 and later versions of KMDF support the EvtDeviceArmWakeFromSxWithReason callback function in addition to the EvtDeviceArmWakeFromSx callback function.

To register an EvtDeviceArmWakeFromSxWithReason callback function, a driver must call WdfDeviceInitSetPowerPolicyEventCallbacks. Drivers can register either an EvtDeviceArmWakeFromSx callback function or an EvtDeviceArmWakeFromSxWithReason callback function, but not both.

The EvtDeviceArmWakeFromSxWithReason callback function provides two parameters that enable the driver to determine why the framework has called it:

Either one or both of these parameters can be TRUE, because of the following scenarios:

For more information about the EvtDeviceArmWakeFromSxWithReason callback function, see the Remarks section of EvtDeviceArmWakeFromSx.

See also

EvtDeviceArmWakeFromS0

EvtDeviceArmWakeFromSx

EvtDeviceDisarmWakeFromSx