RtdbgCreateTraceChannel
RtdbgCreateTraceChannel creates a Trace message channel. This channel is identified by the combination of VendorId, ProductCode, and ChannelId. If a channel with the same combination already exists, it will be opened.
Syntax
DWORD RtdbgCreateTraceChannel(
[out] RTDBG_CHANNEL* pChannel,
[in] ULONG VendorId,
[in] ULONG ProductCode,
[in] ULONG ChannelId,
[in] ULONG BufferLength,
[in] ULONG SourceCount,
[in] ULONG MessageTextLength,
[in] ULONG MessageDataLength
);
Parameters
[out] pChannel
A pointer to store the channel handle.
[in] VendorId
The vendor ID of the application. This should correspond to the CustomerId of the wRTOS SDK license used to build the program.
[in] ProductCode
The product ID defined by the vendor.
[in] ChannelId
The debug channel ID defined by the vendor.
[in] BufferLength
The number of messages in the queue. This value is between 100 and 20,000. The recommended value is 10,000.
The number of sources that require an index filter. The value is between 0 and 32. If the value is set to 5, indexes 0-4 are enabled.
[in] MessageTextLength
The maximum length of the message text in characters. This value is between 0 and 128.
[in] MessageDataLength
The maximum length of the message data in bytes. This value is between 0 and 512.
Return Values
| Error code | Meaning |
|---|---|
|
ERROR_SUCCESS |
The function succeeded. |
|
ERROR_INVALID_PARAMETER |
One of the following conditions occurred:
|
|
ERROR_NOT_ENOUGH_MEMORY |
Failed to create the channel. |
|
ERROR_ABANDONED_WAIT_0 |
Failed to acquire the synchronization lock for the channel. |
Requirements
| Minimum supported version | Header | Library |
|---|---|---|
|
wRTOS 1.0 SDK |
RtdbgApi.h |
RtdbgApi_W64.lib (Windows), RtdbgApi.lib (RTSS) |
See Also: