Compartir a través de


IOCTL_HAL_GET_WAKE_SOURCE (Compact 2013)

10/16/2014

This I/O control message returns the identifier of the wake source that awakened the system from its most recent suspend state. Send this message with OEMIoControl.

Syntax

BOOL OEMIoControl(
    DWORD dwIoControlCode,    // use IOCTL_HAL_GET_WAKE_SOURCE
    LPVOID lpInBuffer,        // pointer to input buffer
    DWORD nInBufferSize,      // input buffer size
    LPVOID lpOutBuffer,       // pointer to output buffer
    DWORD nOutBufferSize,     // output buffer size
    LPDWORD lpBytesReturned   // number of bytes returned
);

Parameters

  • dwIoControlCode
    [in] Control code for the operation. Use IOCTL_HAL_GET_WAKE_SOURCE for this operation.
  • lpInBuffer
    [in] Set to NULL.
  • nInBufferSize
    [in] Set to zero.
  • lpOutBuffer
    [out] Identifier of the wake source that awakened the system from its most recent suspend state.
  • nOutBufferSize
    [out] Set to the size of lpOutBuffer.
  • lpBytesReturned
    [out] Pointer to the number of bytes returned.

Return Values

Returns TRUE if successful; otherwise, returns FALSE.

Remarks

If the wake source is unknown or the system has never suspended, this I/O control 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 I/O control 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 return value is constant between system suspends.

Requirements

Header

pkfuncs.h

See Also

Reference

Power Manager IOCTLs
OEMIoControl