Validates a specific context handle (hCtx).
Syntax
EssValidateHCtx (hCtx)
Parameter | Data Type | Description |
---|---|---|
hCtx | ESB_HCTX_T | The API context handle to validate |
Notes
This function can be used after any extended wait period to insure the program's context handle is still recognized by the server.
Return Value
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 administrator.
Access
This function requires no special access.
Example
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 Server 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
See Also