Returns the usernames of and other information applicable to the users logged on to a given cluster. You can return information for users on all application servers, or filter by application, application server, and user.
The information is returned in arrays that have a one-to-one correspondence.
To return the names of the user’s active modules in a given language, use EnumUsersOnSystemEx. |
<HsxClient>.EnumUsersOnSystem bstrClusterName, vbAllApplications, bstrAppName, vbAllServers, bstrServer, vbAllUsers, lActivityUserID, pvaralActivitySessionIDs, pbstrAppNames, pbstrServerNames, pvaralActivityUserIDs, pbstrActivityUserNames, pvaralCurrentActivity, pvarabstrModuleNames, pvaradTimeStarted, pvarabstrDesc
Boolean (ByVal). Specifies whether information for all applications is returned. Pass TRUE for all applications, FALSE to specify an application with the bstrAppName argument. | |
String (ByVal). The name of the application server for which to return information. This argument is used only if the vbAllApplications argument is set to FALSE. | |
Boolean (ByVal). Specifies whether information for all application servers is returned. Pass TRUE for all application servers, FALSE to specify an application server with the bstrServer argument. | |
String (ByVal). The name of the application server for which to return information. This argument is used only if the vbAllServers argument is set to FALSE. | |
Boolean (ByVal). Specifies whether information for all users is returned. Pass TRUE for all users, FALSE to specify a user with the lActivityUserID argument. | |
Long (ByVal). The activity user ID of the user for whom to return information. This argument is used only if the vbAllUsers argument is set to FALSE. To get a user’s activity user ID, use HsvSystemInfo.GetActivityUserID. | |
Variant array. Returns the internal IDs of the user sessions. | |
Variant array. Returns the names of the applications to which users are logged on. | |
Variant array. Returns the names of the application servers on which users are logged on. | |
Variant array. Returns the activity user IDs of the users who are logged on. | |
Variant array. Returns the usernames of the users who are logged on. | |
Variant array. Returns the IDs of the users’ current activities. Valid values are represented by the HFMConstants type library constants listed in User Activity Constants. | |
Variant array. Returns the names of the modules in which the users are active. | |
Variant array. Returns the timestamps of when the users accessed the system. Array items are formatted as Doubles that can be cast to the Date format. | |
Variant array. Future use. An array is returned, but you can ignore it. |
The following function returns a two-dimensional array that contains the usernames and starting timestamps of all users logged on a given cluster.
Function getUsersTimes(sCluster As String) As Variant Dim vaSessions, vaApps, vaServers, vaUserIDs, vaUserNames Dim vaActivity, vaModules, vaTimes, vaDesc, vaRet() 'm_cHsxClient is an HsxClient object reference m_cHsxClient.EnumUsersOnSystem sCluster, True, "", True, "", _ True, 0, vaSessions, vaApps, vaServers, vaUserIDs, _ vaUserNames, vaActivity, vaModules, vaTimes, vaDesc ReDim vaRet(UBound(vaUserNames), 1) For i = LBound(vaUserNames) To UBound(vaUserNames) vaRet(i, 0) = vaUserNames(i) vaRet(i, 1) = CDate(vaTimes(i)) Next i getUsersTimes = vaRet End Function