EssGetApplicationInfoEx

Description

EssGetApplicationInfoEx() retrieves information from one or more applications.

Syntax

ESS_FUNC_M EssGetApplicationInfoEx (hCtx, AppName, pusCount, ppAppInfoEx);
ESS_HCTX_ThCtx
ESS_STR_TAppName
ESS_PUSHORT_T pusCount
ESS_PPAPPINFOEX_T ppAppInfoEx

Parameters

hCtxEssbase API context handle (logged in).
AppNameName of application for which to return information. If NULL, returns information for all applications.
pusCountNumber of information structures returned.
ppAppInfoAddress of pointer to an array of allocated application info structures.

Return Value

If successful, this function returns an array of application information structures in ppAppInfo.

Notes

Access

This function requires the caller to have at least read access (ESS_PRIV_READ) to the specified application.

Example

ESS_FUNC_M
ESS_GetApplicationInfoEx (ESS_HCTX_T hCtx, ESS_HINST_T hInst)
{
   ESS_FUNC_M		sts = ESS_STS_NOERR;
   ESS_USHORT_T		ind;
   ESS_STR_T		AppName;
   ESS_USHORT_T		Count;
   ESS_PAPPINFOEX_T 	AppInfoEx = NULL;
   
   AppName = "";
   sts = EssGetApplicationInfoEx (hCtx, AppName,
         &Count, &AppInfoEx);
   if(!sts)
   {
      if(AppInfoEx)
      {
printf("\n-----Application Info Ex -----\n\n");
         for (ind = 0; ind <Count; ind++)
         {
printf("Name:%s\r\n",AppInfoEx[ind].Name);
printf("Server Name:%s\r\n", AppInfoEx[ind].Server);
printf("Status:%d\r\n",AppInfoEx[ind].Status);
printf("Users Connected:%d\r\n", 
        AppInfoEx[ind].nConnects);
printf("\r\n");
         }
      EssFree(hInst, AppInfoEx);
      }
   }
   return (sts);
}

See Also

EssGetApplicationInfo()
EssGetApplicationState()
EssGetDatabaseInfo()