cwbSV_GetErrText

Purpose

Returns the message text associated with the top-level (for example, the most recent) error that is identified by the error handle that is provided.

Syntax

 
unsigned int CWB_ENTRY cwbSV_GetErrText(
                             cwbSV_ErrHandle  errorHandle,
                             char            *errorText,
                             unsigned long    errorTextLength,
                             unsigned long   *returnLength);

Parameters

cwbSV_ErrHandle errorHandle - input
Handle that was returned by a previous call to the cwbSV_CreateErrHandle() function.
char * errorText - input/output
Pointer to a buffer that will receive the error message text that is stored in the error that is identified by the handle.
unsigned long errorTextLength - input
Length of the receive buffer passed in. It should include space for the ending null character. 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 string 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_NO_ERROR_MESSAGES
No error messages associated with error handle.

Usage

None