2. OpenAPI Function Reference : OpenAPI Functions : IIapi_setEnvParam() Function—Assign an Environment Parameter and Value in Environment Handle : Environment Parameter IIAPI_EP_TRACE_FUNC
 
Share this page                  
Environment Parameter IIAPI_EP_TRACE_FUNC
An application can set IIAPI_EP_TRACE_FUNC in the IIapi_setEnvParam() function by providing an address of an application function to call back. OpenAPI invokes this application function to send trace information from the server to the application using the following C structure:
typedef struct _IIAPI_TRACEPARM
{
       II_PTR       tr_envHandle;
       II_PTR       tr_connHandle;
       II_INT4      tr_length;
       II_CHAR      *tr_message;
} IIAPI_TRACEPARM;
The syntax of the application function is as follows:
II_VOID traceFunc(IIAPI_PROMPTPARM *parm);
The application must invoke IIapi_setEnvParam() by providing se_paramID to be IIAPI_EP_TRACE_FUNC and se_paramValue to the address of an application-supplied function that matches the calling sequence of the traceFunc() function template shown in this section.
The IIAPI_TRACEPARM parameters are described in the following table:
tr_envHandle
Type: input
Specifies the environment handle associated with the connection. It is NULL if the connection belongs to the default environment associated with IIAPI_VERSION_1 applications.
tr_connHandle
Type: input
Specifies the connection handle identifying the connection.
tr_length
Type: input
Specifies the length of the output trace message in tr_message.
tr_message
Type: input
Specifies the output trace message.
Trace output can also be directed to a file. For more information, see II_API_SET environment variable (see II_API_SET).