Returns the list of log in instances in the current session. Similar to EssListLogins, but includes users hosted in a user directory.
Syntax
ESS_FUNC_M EssListLoginsEx (hCtx, count, logins);
| Parameter | Data Type | Description |
|---|---|---|
hCtx | ESS_HCTX_T | API context handle (input). |
count | ESS_PUSHORT_T | Pointer to the number of log ins returned from the server (output). |
logins | ESS_PPCONNECTINFOEX_T | Pointer to an array of an ESS_CONNECTINFOEX_T structure containing connection information (output). The information structure can include user directories and unique identity attributes. |
Notes
You can call this function more than once for the same user name and server. The API returns a unique context handle for each login to the server.
Return Value
If successful, returns login information and a count of current logins.
Access
Before calling this function, you must first initialize the API and obtain a valid instance handle by calling EssInit().
Example
void DisplayLoginInfo(ESS_CONNECTINFOEX_T login)
{
ESS_STS_T sts = ESS_STS_NOERR;
printf("\tName: %s\n", login.Name);
printf("\tApp Name: %s\n", login.AppName);
printf("\tDb Name: %s\n", login.DbName);
printf("\tLogin MachineName: %s\n", login.LoginMachine);
printf("\tLogin Ip: %ld\n", login.LoginIP);
printf("\tLast login time: %ld\n", login.LastLogin);
printf("\n");
}
ESS_FUNC_M ESS_ListLoginsEx (ESS_HCTX_T hCtx, ESS_HINST_T hInst)
{
ESS_STS_T sts = ESS_STS_NOERR;
ESS_HCTX_T hLocalCtx1;
ESS_HCTX_T hLocalCtx2;
ESS_USHORT_T count, i;
ESS_PCONNECTINFOEX_T logins;
ESS_USHORT_T Items;
ESS_PAPPDB_T pAppsDbs = ESS_NULL;
ESS_ACCESS_T Access;
sts = EssListLoginsEx(hCtx, &count, &logins);
printf("EssListLogins sts: %ld\n", sts);
if(!sts)
{
printf("\nConnection count(s): %d\n", count);
for(i = 0; i < count; i++)
{
DisplayLoginInfo(logins[i]);
}
sts = EssFree (hInst, logins);
printf("EssFree sts: %ld\n", sts);
}
return(sts);
}See Also