IOCTL_HAL_GET_WAKE_SOURCE (Windows CE 5.0)

Send Feedback

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 the platform-specific identifier SYSWAKE_COM1_RING_INDICATE and the Microsoft-defined generic identifier SYSWAKE_RING_INDICATE, but suppose only SYSWAKE_COM1_RING_INDICATE is enabled when the system suspends. In this case, this IOCTL returns SYSWAKE_COM1_RING_INDICATE. If only SYSWAKE_RING_INDICATE is enabled, that identifier is returned. If both identifiers are enabled, but COM1 wakes the system, the kernel returns SYSWAKE_COM1_RING_INDICATE; if COM2 or some other port awakens the system, it returns 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

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.