0.9b (c) 1995 Peter Childs
The function enumerates the printer port names on a local or remote computer.
Syntax
MyRc = RxSplEnumPort(ComputerName, RxStem)
Parameters
ComputerName The name of the computer to query. Use '' for a local computer
The returned parameter values are:
MyRc Return code from the function call. It must be 0 otherwise all other returned values are invalid
'RxStem' A REXX variable which is divided into:
o RxStem.count
The number of printer presentation drivers available. If 0, the following variables are invalid
o RxStem.n.PortName
The name of the port name for entry n. (n = 1 to RxStem.count)
o RxStem.n.PortDriverName
The name of the port driver name for entry n. (n = 1 to RxStem.count)
o RxStem.n.PortDriverPathName
The path to the port driver for entry n. (n = 1 to RxStem.count)
Example use
/* Enumerate printer port names */ if RxFuncQuery('RxSplEnumPort') <> 0 then do call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs' call LoadLsRxutFuncs end ComputerName = '\\ILIDC' MyRc = RxSplEnumPort(ComputerName, RxStem) if MyRc <> '0' then do say 'Error from RxSplEnumPort. RC =' MyRc exit 9 end say 'Number of Printer Ports =' RxStem.count do i=1 to RxStem.count say say 'Printer port name ' RxStem.i.PortName say 'Printer port driver name' RxStem.i.PortDriverName say 'Printer port driver path' RxStem.i.PortDriverPathName end exit 0
Inf-HTML End Run - Successful