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;
} IIAPI_EVENTPARM;
The syntax of the application function is as follows:
II_VOID eventFunc(IIAPI_EVENTPARM *parm);
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:
ev_envHandle
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.
ev_connHandle
Type: input
Specifies the connection handle identifying the connection.
ev_eventName
Type: input
Specifies the name of the database event.
ev_eventOwner
Type: input
Specifies the owner of the database event.
ev_eventDB
Type: input
Specifies the name of the database that raised the event.
ev_eventTime
Type: input
Specifies the time the event occured, stored as an IIAPI_DTE_TYPE data value.