cwbSV_OpenServiceFile

Purpose

Opens the specified service file for READ access (history log, trace file, and so forth) and returns a handle to it.

Syntax

 
unsigned int CWB_ENTRY cwbSV_OpenServiceFile(
                             char                    *serviceFileName,
                             cwbSV_ServiceFileHandle *serviceFileHandle,
                             cwbSV_ErrHandle          errorHandle);

Parameters

char * serviceFileName - input
Points to a buffer that contains the fully-qualified name (for example, c:\path\filename.ext) of the service file to open.
cwbSV_ServiceFileHandle * serviceFileHandle - input/output
Pointer to a cwbSV_ServiceFileHandle where the handle will be returned. This handle should be used in subsequent calls to the service file functions.
cwbSV_ErrHandle errorHandle - output
Any returned messages will be written to this object. It is created with the cwbSV_CreateErrHandle API. The messages may be retrieved through the cwbSV_GetErrText API. If the parameter is set to zero, no messages will be retrieved.

Return Codes

The following list shows common return values.

CWB_OK
Successful completion.
CWB_INVALID_POINTER
NULL passed as handle address.
CWB_FILE_IO_ERROR
File could not be opened.
CWB_NOT_ENOUGH_MEMORY
Insufficient memory to create handle.

Usage

None