EsbValidateHCtx() validates a specific context handle (hCtx).
EssValidateHCtx (hCtx)
ESB_HCTX_T | hCtx |
hCtx | The Essbase API context handle to validate |
This function returns 0 if the context handle is valid, otherwise it returns an error code to indicate the invalid context handle. Possible reasons for an invalid context handle include the login might have timed out or the user was explicitly logged out by the supervisor.
This function requires no special access.
Dim sts As Long Dim Count As Integer Dim pAccess As Integer sts = EsbLogin(hInst, "localhost", "test", "testing", Count, hCtx) sts = EsbSetActive(hCtx, "sample", "Basic", pAccess) ' Do something else not related to Essbase sts = EsbValidateHCtx(hCtx) If (sts <> 0) Then 'if Context no longer valid, re-login sts = EsbLogin(hInst, "localhost", "test", "testing", Count, hCtx) sts = EsbSetActive(hCtx, "Sample", "Basic", pAccess) End If 'Proceed