skip to main content
Interface Provider API : Reference : OAIP_exit
 

OAIP_exit

This IP function is called when the OpenAccess SDK SQL engine is shutting down. The IP should free any memory allocated on behalf of this environment.
int OAIP_exit(
    IP_HENV henv)
Table 10. Parameters for OAIP_exit
Parameter
Type
Description
IN
henv
IP_HENV
A pointer to the environment you set up in OAIP_init().
RETURN
int
DAM_SUCCESS - on success
DAM_FAILURE - on failure
Note: From OAIP_exit, you cannot use the dam_addError/dam_addErrorW function to propagate errors without having a valid OpenAccess SDK SQL engine connection or OpenAccess SDK SQL engine statement handle. If the IP encounters problems when shutting down, then use tm_trace to log the error and use (C/C++) printf to display the error on the console.
Note: Regarding multithreaded mode: OAIP_exit is called only once from the main thread. In a client/server build, this function is called by the main thread of the OpenAccess SDK Server. In a local build, this function is called during DLL unload on the client application's thread that had loaded the DLL.

See also

*dam_addError/dam_addErrorW
*tm_trace