# EssGGetAPIInstance

Description

EssGGetAPIInstance() gets the Essbase API initialization instance handle.

Syntax

    ESSG_FUNC_M EssGGetAPIInstance (Handle, pEssHinst);

ESSG_HANDLE_T | Handle
ESSG_PPVOID_T | pEssHinst

Parameters

Handle | Handle passed back from EssGInit.
pEssHinst | Variable for the return of the Essbase API instance handle used by the Essbase Grid API.

Return Value

If successful, returns ESSG_STS_NOERR.

Notes

- Gets the Essbase API initialization instance handle.
- This handle the caller to call non-Grid Essbase API functions that require an Essbase instance handle.

Access

None.

Example

    #include <essapin.h>
    #include <essgapin.h>

    ESSG_FUNC_M    sts = ESS_STS_NOERR;
    ESSG_PVOID_T   EssHinst;
    ESSG_INIT_T    InitStruct;
    ESSG_HANDLE_T  Handle;

    InitStruct.ulVersion = ESSG_VERSION;
    InitStruct.ulMaxRows = 1000;
    InitStruct.ulMaxColumns = 200;
    InitStruct.pfnMessageFunc = ESS_NULL;
    InitStruct.pUserdata = ESS_NULL;

    /* initializes EGAPI */
    sts = EssGInit(&InitStruct, Handle);

    /* get API initialization instance handle */
    if(!sts)
       sts = EssGGetAPIInstance(Handle, &EssHinst);

See Also

Using the Grid API Functions
Grid API Structures