# EssGetGlobalState

Description

EssGetGlobalState() gets the server global state structure which contains parameters for system administration.

Syntax

    ESS_FUNC_M EssGetGlobalState (hCtx, ppGlobal);

ESS_HCTX_T | hCtx
ESS_PPGLOBAL_T | ppGlobal

Parameters

hCtx | Essbase API context handle.
ppGlobal | Address of pointer to receive allocated global state structure.

Return Value

If successful, returns the current state of the server global state structure in ppGlobal.

Notes

- The memory allocated for ppGlobal should be freed using EssFree().

Access

This function requires the caller to be a supervisor.

Example

    ESS_FUNC_M
    ESS_GetGlobalState (ESS_HCTX_T hCtx, ESS_HINST_T hInst)
    {
       ESS_FUNC_M         sts = ESS_STS_NOERR;
       ESS_PGLOBAL_T  pGlobal = NULL;

       sts = EssGetGlobalState(hCtx, &pGlobal);

       if(!sts && pGlobal)
       {
        printf("--------- Global State ----------\n\n");
        printf("Security->%d Logins->%d\r\n",
                pGlobal->Security, pGlobal->Logins);
        printf("Access->%ld Validity->%d\r\n",
                pGlobal->Access, pGlobal->Validity);
        printf("Currency->%d PwMin->%d\r\n",
                pGlobal->Currency,pGlobal->PwMin);
        printf("InactivityTime->%ld InactivityCheck->%ld\r\n", pGlobal->InactivityTime,
    pGlobal->InactivityCheck);

          EssFree(hInst, pGlobal);
       }
       return (sts);
    }

See Also

EssSetGlobalState()