EssSetApplicationState

Sets user-configurable parameters for the application using the application's state structure.

Syntax

ESS_FUNC_M  EssSetApplicationState (hCtx, AppName, pAppState);
ParameterData TypeDescription

hCtx

ESS_HCTX_T

API context handle.

AppName

ESS_STR_T

Application name.

pAppState

ESS_APPSTATE_T

Pointer to application state structure.

Notes

Return Value

None.

Access

This function requires the caller to have application designer privilege (ESS_PRIV_APPDESIGN) for the specified application.

Example

ESS_FUNC_M
ESS_SetAppState (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)
      {   
         /*****************************
          * Update AppState structure *
          *****************************/
         sts = EssSetApplicationState (hCtx,
               AppName, AppState);
         EssFree (hInst, AppState);
   }
   return (sts);
}

See Also