Gets the server global state structure which contains parameters for system administration.
Syntax
ESS_FUNC_M EssGetGlobalState (hCtx, ppGlobal);
Parameter | Data Type | Description |
---|---|---|
hCtx | ESS_HCTX_T | API context handle. |
ppGlobal | ESS_GLOBAL_T | Address of pointer to receive allocated global state structure. |
Notes
The memory allocated for ppGlobal should be freed using EssFree().
Return Value
If successful, returns the current state of the server global state structure in ppGlobal.
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