RequestDeviceWakeup

[This is preliminary documentation and subject to change.]

The RequestDeviceWakeup function issues a device wake-up request.

BOOL RequestDeviceWakeup(
  HANDLE hDevice      // handle to object or device
);
 

Parameters

hDevice
Handle to an object on the device, such as a file or socket, or a handle to the device itself.

Return Values

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. The function will fail if the device does not support wake-up, the system is entering the sleeping state, or wake-up could not be enabled.

Remarks

If the device is not marked as a wake-up device, the system will issue the IOCTL_SET_RESUME command to the driver to tell it to enable wake-up. When the system puts the computer in the sleeping state, it makes sure that the device is in a power state that supports signaling wake-up operations.

To cancel the device wake-up request, use the CancelDeviceWakeupRequest function. To specify a latency requirement on the time it takes the system to wake up the computer, use the RequestWakeupLatency function.

QuickInfo

  Windows NT: Requires version 5.0 or later.
  Windows: Requires Windows 98.
  Windows CE: Unsupported.
  Header: Declared in winbase.h.
  Import Library: Use kernel32.lib.

See Also

Power Management Overview, Power Management Functions, CancelDeviceWakeupRequest, RequestWakeupLatency