Purpose
Returns the trace data portion of the service record object that is identified
by the handle that is provided.
Syntax
unsigned int CWB_ENTRY cwbSV_GetTraceData(
cwbSV_ServiceRecHandle serviceRecHandle,
char *traceData,
unsigned long traceDataLength,
unsigned long *returnLength);
Parameters
- cwbSV_ServiceRecHandle serviceRecHandle - input
- Handle that was returned by a previous call to the cwbSV_CreateServiceRecHandle()
function.
- char * traceData - input/output
- Pointer to a buffer that will receive the trace data that is stored
in the record that is identified by the handle. Note: The data that is returned
is binary. Hence, it is NOT returned as an ASCIIZ string.
- unsigned long traceDataLength - input
- Length of the receive buffer passed in. If the buffer is too small,
the value will be truncated, and CWB_BUFFER_OVERFLOW and returnLength will
be set.
- unsigned long * returnLength - input/output
- Optional, may be NULL. A return address to store the number of bytes
needed to hold the output data if the receive buffer is too small.
Return Codes
The following list shows common return values.
- CWB_OK
- Successful completion.
- CWB_BUFFER_OVERFLOW
- Output buffer too small, data truncated.
- CWB_INVALID_POINTER
- NULL passed on output parameter.
- CWB_INVALID_HANDLE
- Handle is not valid.
- CWBSV_INVALID_RECORD_TYPE
- Type is not CWBSV_DATA_TRACE_REC.
Usage
If the record type is not CWBSV_TRACE_DATA_REC, a return code of CWBSV_INVALID_RECORD_TYPE
will be returned. (note: cwbSV_GetServiceType() returns the current record
type)