# EsbGetProcessState

Description

EsbGetProcessState() gets the current state of an asynchronous process, such as a calculate or a data import.

Syntax

    EsbGetProcessState (hCtx, ProcState)

    ByVal hCtx      As Long
          ProcState As ESB_PROCSTATE_T

Parameters

hCtx | Essbase VB API context handle.
ProcState | Pointer to process state structure

Return Value

If successful, returns the current process state in the state structure pProcState. Values for pProcState:
ESB_STATE_DONE: 0 = Done
ESB_STATE_INPROGRESS: 1 = In progress
ESB_STATE_FINALSTAGE: 5 = In final stage;
cannot be canceled

Notes

- Your program should call this function at regular intervals (between 5 & 10 seconds) until it returns ESB_STATE_DONE in pProcState.
- Calling this function except after initiating a successful asynchronous database operation, for example, a calculation, generates an error.

Access

This function requires no special privilege.

Example

    Declare Function EsbGetProcessState Lib "ESBAPIW" (ByVal hCtx As Long, ProcState As ESB_PROCSTATE_T) As Long
    See the examples for EsbBeginCalc(), EsbCalc(), and EsbImport().

See Also

EsbBeginCalc()
EsbCalc()
EsbCancelProcess()
EsbImport()