Gets an application's information structure, which contains non user-configurable parameters for the application.
Syntax
ESS_FUNC_M EssGetApplicationInfo (hCtx, AppName, ppAppInfo);
Parameter | Data Type | Description |
---|---|---|
hCtx | ESS_HCTX_T | API context handle (logged in) |
AppName | ESS_STR_T | Application name |
ppAppInfo | ESS_APPINFO_T | Address of pointer to receive allocated application info structure |
Notes
This function can only be called for applications on the server.
The memory allocated for ppAppInfo should be freed using EssFree().
Return Value
If successful, this function returns a pointer to an allocated application info structure in ppAppInfo.
Access
This function requires the caller to have at least read access (ESS_PRIV_READ) to the specified application.
Example
ESS_FUNC_M ESS_GetAppInfo (ESS_HCTX_T hCtx, ESS_HINST_T hInst ) { ESS_FUNC_M sts = ESS_STS_NOERR; ESS_PAPPINFO_T AppInfo; ESS_USHORT_T ind; ESS_STR_T AppName; AppName = "Sample"; sts = EssGetApplicationInfo (hCtx, AppName, &AppInfo); if (!sts) { if (AppInfo) { printf ("\r\n-------Application Info-------\r\n\r\n"); printf ("Name : %s\r\n", AppInfo->Name); printf ("Server Name : %s\r\n", AppInfo->Server); printf ("Status : %d\r\n", AppInfo->Status); printf ("Users Connected : %d\r\n", AppInfo->nConnects); printf ("Number of DBs : %d\r\n", AppInfo->nDbs); printf ("\r\n--List of Databases--\r\n\r\n"); for (ind = 0; ind < AppInfo->nDbs; ind++) printf ("database(%d) : %s\r\n", ind, AppInfo->DbNames [ind]); EssFree (hInst, AppInfo); } } return (sts); }
See Also