Gets an application's state structure, which contains user-configurable parameters for the application.
Syntax
ESS_FUNC_M EssGetApplicationState (hCtx, AppName, ppAppState);
Parameter | Data Type | Description |
---|---|---|
hCtx | ESS_HCTX_T | API context handle. |
AppName | ESS_STR_T | Application name. |
ppAppState | ESS_APPSTATE_T | Address of pointer to receive allocated application state structure. |
Notes
This function cannot be called for local applications; it can only be called for applications on the server.
Memory allocated for ppAppState should be freed using EssFree().
Return Value
If successful, this function returns a pointer to an allocated application state structure in ppAppState.
Access
This function requires the caller to have at least read access (ESS_PRIV_READ) to the specified application.
Example
ESS_FUNC_M ESS_GetAppState (ESS_HCTX_T hCtx, ESS_HINST_T hInst ) { ESS_FUNC_M sts = ESS_STS_NOERR; ESS_PAPPSTATE_T AppState; ESS_STR_T AppName; AppName = "Sample"; sts = EssGetApplicationState (hCtx, AppName, &AppState); if (!sts) { if (AppState) { EssFree (hInst, AppState); } } return (sts); }
See Also