Calling the API

This section explains how applications invoke API functions.

Applications invoke API functions defined in C-language header files, and a dynamic link library (DLL). Each function call returns an integer result code, defined in the ctgstdat.h header file. A function that completes normally returns the code CTG_STAT_OK. A function that needs to report a problem returns a negative code, detailed in the ctgstdat.h header file.

The statistics API does not provide logging messages. Runtime operation of the API functions can be monitored using trace facilities. Statistics API tracing can be enabled programatically with data written to stderr, or a specified file. API errors are reported to the calling application using an integer result code.