IOCTL_HAL_GET_WAKE_SOURCE

The IOCTL returns the identifier of the wake source that awakened the system from its most recent suspend state. The OEMIoControl function calls this IOCTL.

Parameters

  • dwIoControlCode
    [in] Set to IOCTL_HAL_GET_WAKE_SOURCE.
  • lpInBuf
    [in] Set to NULL.
  • nInBufSize
    [in] Set to zero, which is the size of lpInBuf.
  • lpOutBuf
    [out] Identifier of the wake source that awakened the system from its most recent suspend state.
  • nOutBufSize
    [out] Size of lpOutBuf.
  • lpBytesReturned
    [out] Pointer to the number of bytes returned.
  • lpOverlapped
    [in] Ignored.

Return Values

TRUE indicates success. FALSE indicates failure.

Remarks

If the wake source is unknown or the system has never suspended, this IOCTL returns SYSWAKE_UNKNOWN. The kernel should map the wake source to the most appropriate identifier that was enabled at the time of suspend. For example, suppose the kernel supports both the platform-specific identifier SYSWAKE_COM1_RING_INDICATE and the Microsoft-defined generic identifier SYSWAKE_RING_INDICATE but only SYSWAKE_COM1_RING_INDICATE was enabled when the system suspended. In this case, this IOCTL would return SYSWAKE_COM1_RING_INDICATE. If only SYSWAKE_RING_INDICATE was enabled, that identifier would be returned. If both identifiers were enabled but COM1 woke the system, the kernel would return SYSWAKE_COM1_RING_INDICATE; if COM2 or some other port awakened the system it would return SYSWAKE_RING_INDICATE.

The IOCTL_HAL_GET_WAKE_SOURCE return value is constant between system suspends.

Requirements

OS Versions: Windows CE .NET 4.1 and later.
Header: Pkfuncs.h.

See Also

OEMIoControl | Power Management Wake Sources

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.