# EssListConnections

Description

EssListConnections() lists all users who are connected to the currently logged in server or application.

Syntax

    ESS_FUNC_M EssListConnections (hCtx, pCount, ppUserList);

ESS_HCTX_T | hCtx
ESS_PUSHORT_T | pCount
ESS_PPUSERINFO_T | ppUserList

Parameters

hCtx | Essbase API context handle
pCount | Variable to receive count of users
ppUserList | Pointer to an array of user information structures. This array is allocated by the API

Return Value

Returns 0 if successful.

Notes

- pCount contains the number of elements in the ppUserList array.
- If hCtx is a Supervisor, ppUserList is a list of users logged in to the server. If hCtx is an Application Designer, ppUserList is a list of users connected to any application for which hCtx is an Application Designer.
- Use EssFree() to free the buffer allocated for ppUserList.

Access

This function requires the caller to have Supervisor or Application Designer privilege.

Example

    ESS_FUNC_M ESS_ListUserConnections (ESS_HCTX_T        hCtx, ESS_HINST_T hInst)
    {
            ESS_FUNC_M         sts = ESS_STS_NOERR;
            ESS_USHORT_T      usrcnt;
            ESS_PUSERINFO_T   users;
            sts = EssListConnections(hCtx, &usrcnt,     &users);
            if(!sts)
            EssFree(hInst, users);
            return(sts);
    }