0.9b (c) 1995 Peter Childs
The function retrieves a list of all network services that are started.
Syntax
MyRc = NetEnumerate(NETSERVICE, 'serviceInfo', SrvName)
Parameters
The parameters specified are:
'serviceInfo' The REXX variable receiving the result. The variable is divided into:
o serviceInfo.0
The number of services started
o serviceInfo.i
The started service name entry i, where the variable i has a value from 1 to serviceInfo.0
SrvName The server computer name
Note
The server computer name can be specified as '' for a local server.
Example
/* List service names started on computer */ call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs' call LoadLsRxutFuncs NETSERVICE = 170 SrvName = '\\DOMAIN_CONTRLR' myRc = NetEnumerate(NETSERVICE, 'serviceInfo', SrvName) if myRc <> '0' then do say 'Got error from NetEnumerate() ' myRc call DropLsRxutFuncs exit 9 end if serviceInfo.0 = 0 then do say 'No service listed as started' call DropLsRxutFuncs exit 0 end say 'Number of services started: ' serviceInfo.0 say do i=1 to serviceInfo.0 say serviceInfo.i end call DropLsRxutFuncs call RxFuncDrop 'LoadLsRxutFuncs' exit 0
Example Output
Number of services started: 8 REQUESTER MESSENGER SERVER NETLOGON LSSERVER ALERTER NETRUN TIMESOURCE
Inf-HTML End Run - Successful