2. OpenAPI Function Reference : OpenAPI Functions : IIapi_setEnvParam() Function—Assign an Environment Parameter and Value in Environment Handle : Environment Parameter IIAPI_EP_EVENT_FUNC
Share this page                  
Environment Parameter IIAPI_EP_EVENT_FUNC
An application can set IIAPI_EP_EVENT_FUNC in the IIapi_setEnvParam() function by providing an address of an application function to callback. OpenAPI invokes this application function to send information on database events which failed to match an existing OpenAPI event handle (and would otherwise be ignored) to the application using the following C structure:
typedef struct _IIAPI_EVENTPARM
       II_PTR           ev_envHandle;
       II_PTR           ev_connHandle;
       II_CHAR          *ev_eventName;
       II_CHAR          *ev_eventOwner;
       II_CHAR          *ev_eventDB;
       IIAPI_DATAVALUE  ev_eventTime;
The syntax of the application function is as follows:
The application must invoke IIapi_setEnvParam() by providing sc_paramID to be IIAPI_EP_EVENT_FUNC and sc_paramValue to the address of an application-supplied function that matches the calling sequence of the eventFunc() function template shown in this section.
The IIAPI_EVENTPARM parameters are described in the following table:
Type: input
Specifies the environment handle associated with the connection. It is NULL if the connection is associated with the default environment assigned to IIAPI_VERSION_1 applications.
Type: input
Specifies the connection handle identifying the connection.
Type: input
Specifies the name of the database event.
Type: input
Specifies the owner of the database event.
Type: input
Specifies the name of the database that raised the event.
Type: input
Specifies the time the event occured, stored as an IIAPI_DTE_TYPE data value.