cwbSV_GetServiceFileName

Purpose

Returns the fully-qualified path and file name of where the service records are being logged to for a particular file type.

Syntax

 
unsigned int CWB_ENTRY cwbSV_GetServiceFileName(
                             cwbSV_ServiceFileType  serviceFileType,
                             char                  *fileName,
                             unsigned long          fileNameLength,
                             unsigned long         *returnLength);

Parameters

cwbSV_ServiceFileType serviceFileType - input
Value indicating which service file name you want returned. - CWBSV_HISTORY_LOG - CWBSV_PROBLEM_LOG - CWBSV_DETAIL_TRACE_FILE - CWBSV_ENTRY_EXIT_TRACE_FILE
char * fileName - input/output
Pointer to a buffer that will receive the service file name associated with the one that was requested.
unsigned long fileNameLength - 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. NOTE: The recommended size is CWBSV_MAX_FILE_PATH.
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.
CWBSV_INVALID_FILE_TYPE
Unusable file type passed-in.

Usage

The filename string returned could be used as input to the cwbSV_OpenServiceFile() routine.