GetUserList

Fetches the list of the users either of a cabinet or within a specific group.

Public Function GetUserList(ByVal GroupId As Long, ByVal StartPos As Long, ByVal FetchCount As Long, ByRef RetrievedRecCount As Long, ByRef TotalRecCount As Long, ByRef UserList() As Byte) As Long

 

Parameters

In/out

Name

Data type

Description

In

GroupId

Long

Index of the group

In

StartPos

Long

Starting position

In

FetchCount

Long

Number of users to be fetched in each batch if result has to  fetched in batches

Out

RetrievedRecCount

Long

Retrieved count of the users

Out

TotalRecCount

Long

Total count retrieved

Out

UserList

Byte[TagUser]

List of users fetched in the form of the byte array

 

Description

This function is called form both admin and desktop. It is called whenever user list  has to fetched. This call also supports fetching user list in batches. It returns the fetched user list in 'UserList' parameter and the fetch count in 'RetrievedRecCount' parameter. If FetchCount is not passed (passed as –1) it is internally set to 32000.

 

Return value

Name

Description

 1 

In case of success

-3

Cabinet not connected

-4

 Invalid Operation

 

Example

Dim GroupId As Long

Dim StartPos As Long

Dim FetchCount As Long

Dim RetrievedRecCount As Long

Dim TotalRecCount As Long

Dim UserList() As Byte

Dim lRetVal     As Long

Dim gPDb As PanDb.pdbCls


Set gPDb = New PanDb.pdbCls

GroupId = 1

StartPos = 0

FetchCount = -1

lRetVal=gPDb.GetUserList(GroupId,StartPos,FetchCount,RetrievedRecCount,TotalRecCount,UserList)

if lRetVal <> NG_SUCCESS Then

    MsgBox gPDb.ErrDescription, vbInformation

     Screen.MousePointer = vbNormal

Endif