0.9b (c) 1995 Peter Childs
The function enumerates print destinations available.
Syntax
MyRc = RxSplEnumPrinter(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 destinations available. If 0, the following variables are invalid
o RxStem.n.Type
The print destination type for entry n. (n = 1 to RxStem.count) The following values are returned:
Value returned This is -------------------- ------------------------------------------ SPL_PR_QUEUE Print destination is a queue SPL_PR_DIRECT_DEVICE Print destination is a direct print device SPL_PR_QUEUED_DEVICE Print destination is a queued print device SPL_PR_UNKWOWN Print destination is unkwown
o RxStem.n.PrintDestinationName
The print destination name for entry n. (n = 1 to RxStem.count)
o RxStem.n.Description
The print destination description for entry n. (n = 1 to RxStem.count)
o RxStem.n.LocalName
The local name of a remote print destination for entry n. (n = 1 to RxStem.count)
Example use
/* Enumerate printer destination information */ if RxFuncQuery('RxSplEnumPrinter') <> 0 then do call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs' call LoadLsRxutFuncs end ComputerName = '\\ILIDC' MyRc = RxSplEnumPrinter(ComputerName, RxStem) if MyRc <> '0' then do say 'Error from RxSplEnumPrinter. RC =' MyRc exit 9 end say 'Number of Printer Descriptions =' RxStem.count do i=1 to RxStem.count say say 'Printer Destination type ' RxStem.i.Type say 'Printer Destination name ' RxStem.i.PrintDestinationName say 'Printer Destination description' RxStem.i.Description say 'Printer Destination local name ' RxStem.i.LocalName end exit 0
Inf-HTML End Run - Successful