# xxxFormatTraceBuffer

Formats a service-specific trace buffer.

#### Prototype

DWORD xxxFormatTraceBuffer ( unsigned tracetag, void *inbuffer, unsigned insize, char *outbuffer, unsigned outsize)

Argument | Description
tracetag | Service specific tracetag.
inbuffer | Pointer to a byte array containing the trace record to format.
insize | Size of inbuffer.
outbuffer | Pointer to the character array for the formatted output.
outsize | Size of outbuffer.

#### Return values

Return value | Description
SUCCESS |
CTAERR_NOT_IMPLEMENTED | The function was not implemented.

#### Details

xxxFormatTraceBuffer is called only by ctdaemon when a trace buffer is written to the Natural Access trace log and is referred to by the service specific tracetag. Trace tags that are defined by Natural Access can be formatted directly by dispatcher formatting routines. Trace tags created by a service contain the service ID in the high word and a service specific ID in the low word.

inbuffer is the exact array of bytes that was passed to dispLogTrace by the service that ultimately formats the buffer. This mechanism allows services to define their own trace structures and have them printed by ctdaemon.

outbuffer should be checked to make sure that it can hold the entire formatted trace output before anything is written to it. Refer to xxxFormatMessage for more details.

For more information about this function, refer to Runtime binding functions.