# EssGInit

Description

EssGInit() initializes the Essbase Grid API.

Syntax

    ESSG_FUNC_M EssGInit (pInitStruct, pHandle);

ESSG_PINIT_T | pInitStruct
ESSG_PHANDLE_T | pHandle

Parameters

pInitStruct | Pointer to a structure containing useful information for the EGAPI.
pHandle | Pointer to the handle sent back from the EGAPI.

Return Value

If successful, returns ESSG_STS_NOERR.

Notes

- Initializes the Essbase Grid API.
- Required before calling all other EGAPI functions except for EssGVersion.
- Make this call only once at the beginning of a session.
- This function returns a handle, which you must pass to EssGNewGrid for each grid being used, and to any other EGAPI call requiring a non-grid specific handle.
- A thread may require its own handle (pHandle) to avoid overwriting another thread's networking status information.

Access

None.

Example

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

    ESSG_FUNC_M     sts = ESS_STS_NOERR;
    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;

    sts = EssGInit(&InitStruct, &Handle);

See Also

Using the Grid API Functions
Grid API Structures