0.9b (c) 1995 Peter Childs
Retrieves information about logged-on users.
Syntax
MyRc = NetGetInfo(NETLOGON, 'logonInfo') MyRc = NetGetInfo(NETLOGON, 'logonInfo', SrvName)
Parameters
The NetGetInfo(NETLOGON) function has two different forms. The first form with no SrvName parameter is identical to the second form with the SrvName parameter value set to ''.
The parameters specified are:
'logonInfo' The REXX variable receiving the result. The variable is divided into:
o logonInfo.num_entries
The number of logon information entries. Each entry is obtained by the index i, which has a value from 1 to logonInfo.num_entries
o logonInfo.i.eff_name
The name of the account to which the user was logged on
o logonInfo.i.computer
The computer name
o logonInfo.i.full_name
The fullname value specified in the user account
o logonInfo.i.usrcomment
The user settable value for user comments
o logonInfo.i.logon_time
The time and date when the user logged on
SrvName The server computer name
Note
The server computer name can be specified as '' for a local server.
Example
/* Get information on logged on users on this server */ call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs' call LoadLsRxutFuncs NETLOGON = 50 SrvName = '\\FSCDC' myRc = NetGetInfo(NETLOGON, 'logonInfo', SrvName) if myRc <> '0' then do say 'Got error from NetGetInfo() ' myRc call DropLsRxutFuncs exit 9 end if logonInfo.num_entries <> 0 then do say "Number of entries: " logonInfo.num_entries do i=1 to logonInfo.num_entries say say "Logon eff_name: " logonInfo.i.eff_name say "Logon computer: " logonInfo.i.computer say "Logon full name: " logonInfo.i.full_name say "Logon user comment: " logonInfo.i.usrcomment say "Logon time: " logonInfo.i.logon_time end end call DropLsRxutFuncs call RxFuncDrop 'LoadLsRxutFuncs' exit 0
Example Output
Number of entries: 1 Logon eff_name: MADSEN Logon computer: FSC30DCR Logon full name: Peter the Great Madsen Logon user comment: My system in location N91-3161 Logon time: Tue May 4 07:44:26 1993
Inf-HTML End Run - Successful