Terminating the API

At the very end of its execution, your program should terminate the Essbase API by calling EsxTerm(), to ensure the proper release of all API resources. This function also logs out all active server connections (if they are not already explicitly logged out by your program).

/* C Example of terminating the API */
ESS_STS_T       sts;
ESS_HINST_T     hInst;
sts = EssTerm (hInst);
hInst = ESS_INVALID_HINST;

' VB Example of terminating the API
Dim     sts as ESB_STS_T
Dim     hInst as ESB_HCTX_T
sts = EsbTerm (hInst)
hInst = ESB_INVALID_HINST

After terminating the API, do not attempt to make any more calls to API functions. If you make more calls your program will probably crash.