# EsbListConnections

Description

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

Syntax

    EsbListConnections (hCtx, pItems)

    ByVal hCtx   As Long
          pItems As Integer

Parameters

hCtx | Essbase VB API context handle.
pItems | Variable to receive Items of users.

Return Value

Returns 0 if successful.

Notes

- If hCtx is a Supervisor, pItems contains the number of users logged in to the server. If hCtx is an Application Designer, pItems contains the number users connected to any application for which hCtx is an Application Designer.
- Call EsbGetNextItem() once for each user (returned in the pItems variable). Each call to EsbGetNextItem() returns the user information in a ESB_USERINFO_T structure.

Access

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

Example

    Declare Function EsbListConnections Lib "ESBAPIW" (ByVal hCtx As Long, Items As Integer) As Long
    Sub ESB_ListConnections()
       Dim Items As Integer
       Dim UserInfo As ESB_USERINFO_T
       Dim sts As Long
       '*****************
       ' List Connections
       '*****************
       sts = EsbListConnections(hCtx, Items)
       For n = 1 To Items
         '*****************************
         ' Get next User Info structure
         ' from the list
         '*****************************
         sts = EsbGetNextItem(hCtx,
               ESB_USERINFO_TYPE, UserInfo)
       Next
    End Sub

See Also

EsbListLocks()
EsbListUsers()
EsbGetNextItem()