RtdbgGetMessage

RtdbgGetMessage gets the first Standard or Trace message in the queue.

Syntax

Copy
DWORD RtdbgGetMessage(
  [in]    RTDBG_CHANNEL Channel,
  [out]   RTDBG_EXTENDED_MESSAGE_HEADER* pHeader,
  [in]    ULONG MessageBufferLength,
  [out]   wchar_t* pMessage,
  [in]    ULONG DataBufferLength,
  [out]   byte* pData
);

Parameters

[in] Channel

The handle of the channel to get the message from.

[out] pHeader

The pointer of the message header described in RTDBG_EXTENDED_MESSAGE_HEADER.

[in] MessageBufferLength

The size of the message buffer in WORDs.

[out] pMessage

The buffer of the message text in Unicode characters.

[in] DataBufferLength

The size of the data buffer in bytes.

[out] pData

The buffer for the data of the message.

Return Values

Error code Meaning

ERROR_SUCCESS

The function succeeded.

ERROR_INVALID_HANDLE

Parameter Channel has been closed or is invalid.

ERROR_INVALID_PARAMETER

One of the following conditions occurred:

  • The value of parameter Channel is NULL.
  • The value of parameter MessageBufferLength is above 0 and pMessage is NULL.
  • The value of parameter DataBufferLength is above 0 and pData is NULL.

ERROR_NO_DATA

No message in the queue.

Remarks

The RtdbgGetMessage function is deterministic.

Requirements

Minimum supported version Header Library

wRTOS 1.0 SDK

RtdbgApi.h

RtdbgApi_W64.lib (Windows), RtdbgApi.lib (RTSS)

See Also: