# EsbSetGlobalState

Description

EsbSetGlobalState() sets the server global state structure which contains parameters for system administration.

Syntax

    EsbSetGlobalState (hCtx, pGlobal)

    ByVal hCtx    As Long
          pGlobal As ESB_GLOBAL_T

Parameters

hCtx | Essbase VB API context handle.
pGlobal | Pointer to global state structure.

Return Value

None.

Notes

- When changing parameter values, it is advisable to call EsbGetGlobalState() first to get the correct values of any parameters you do not wish to change.

Access

This function requires the caller to be a supervisor.

Example

    Declare Function EsbSetGlobalState Lib "ESBAPIW" (ByVal hCtx As Long, Global As ESB_GLOBAL_T) As Long

    Sub ESB_SetGlobalState ()
       Dim sts As Long
       Dim pGlobal As ESB_GLOBAL_T

       pGlobal.Security = ESB_TRUE
       pGlobal.Logins = ESB_TRUE
       pGlobal.Access = ESB_ACCESS_APPCREATE
       pGlobal.Validity = 14
       pGlobal.Currency = ESB_FALSE
       pGlobal.PwMin = 6
       pGlobal.InactivityTime = 300
       pGlobal.InactivityCheck = 40

       '*****************
       ' Set Global State
       '*****************
       sts = EsbSetGlobalState (hCtx, pGlobal)
    End Sub

See Also

EsbGetGlobalState()