Gets the list of users who are members of a group (or the list of groups to which a user belongs).
Syntax
EsbGetGroupList (hCtx, GrpName, pItems) ByVal hCtx As Long ByVal GrpName As String pItems As Integer
| Parameter | Description |
|---|---|
hCtx | VB API context handle. |
GrpName | Group or user name. |
pItems | Address of variable to receive Items of user names. |
Notes
This function can also be used to get the list of groups to which a user belongs, by using a user name as the GroupName argument.
Return Value
If successful, returns a Items of user names in pItems, and generates an array of user name strings accessible via EsbGetNextItem().
Access
This function requires the caller to have Create/Delete User privilege (ESB_PRIV_USERCREATE) for the logged in server, unless they are a user getting their own list of groups.
Example
Declare Function EsbGetGroupList Lib "ESBAPIN" (ByVal hCtx As Long, ByVal GroupName As String, Items As Integer) As Long
Sub ESB_GetGroupList ()
Dim Items As Integer
Dim Group As String
Dim GroupName As String * ESB_USERNAMELEN
Dim sts As Long Group = "User Group" '***************
' Get Group List
'***************
sts = EsbGetGroupList (hCtx, Group, Items) For n = 1 To Items '**************************
' Get next User Name String
' from the list
'**************************
sts = EsbGetNextItem (hCtx,
ESB_GROUPNAME_TYPE, ByVal GroupName)
Next
End SubSee Also