0.9b (c) 1995 Peter Childs
The function provides a list of serial devices on a server.
Syntax
MyRc = NetEnumerate(NETCHARDEV, 'charDevInfo', SrvName)
Parameters
The parameters specified are:
'charDevInfo' The REXX variable receiving the result. The variable is divided into:
o charDevInfo.0
The number of serial devices
o charDevInfo.i
The serial device name entry i, where the variable i has a value from 1 to charDevInfo.0
SrvName The server computer name
Note
The server computer name can be specified as '' for a local server or computer.
Example
/* List serial device names on a server */ call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs' call LoadLsRxutFuncs NETCHARDEV = 130 SrvName = '\\DOMAIN_CONTRLR' myRc = NetEnumerate(NETCHARDEV, 'charDevInfo', SrvName) if myRc <> '0' then do say 'Got error from NetEnumerate() ' myRc call DropLsRxutFuncs exit 9 end if charDevInfo.0 = 0 then do say 'No serial devices defined on server' call DropLsRxutFuncs exit 0 end say 'Number of serial device names: ' charDevInfo.0 say do i=1 to charDevInfo.0 say charDevInfo.i end call DropLsRxutFuncs call RxFuncDrop 'LoadLsRxutFuncs' exit 0
Example Output
Number of serial device names: 1 COM1
Inf-HTML End Run - Successful