All application programs must initialize the API (with EsxInit()) before using any other Essbase functions. The program should perform the initialization only once, preferably during the program's startup sequence.
/* C Example of initializing the API */ ESS_STS_T sts; ESS_INIT_T InitStruct; ESS_HINST_T hInst; /* first clear the init structure (use API defaults) */ memset (&InitStruct, 0, sizeof (ESS_INIT_T)); sts = EssInit (&InitStruct, &hInst); ' VB Example of initializing the API Dim sts as ESB_STS_T Dim InitStruct as ESB_INIT_T Dim hInst as ESB_HINST_T sts = EsbInit (InitStruct, hInst)
The API default settings are appropriate for most application programs. If you need to change the settings, refer to the EssInit and/or EsbInit for more information on setting the individual fields of the API initialization structure (ESS_INIT_T and ESB_INIT_T) in your program.
The instance handle (hInst) that is returned from EsxInit() should be saved within your program for subsequent API calls. This instance handle uniquely identifies your program and its associated resources to the API.