IBM OS/2 LAN Server REXX Utility DLL


Inf-HTML [About][Toc][Index] 0.9b (c) 1995 Peter Childs


RxSplEnumDevice()


The function enumerates printer devices on a local or remote computer. 
Syntax 


MyRc = RxSplEnumDevice(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 devices. If 0, the following variables are 
     invalid 
   o RxStem.n.PrinterName 
     The printer device name for entry n. (n = 1 to RxStem.count) 
   o RxStem.n.LogAddr 
     The printer device logical address for entry n. (n = 1 to 
     RxStem.count) 
   o RxStem.n.Comment 
     The printer device comment for entry n. (n = 1 to RxStem.count) 
   o RxStem.n.Drivers 
     The printer drivers supported by device entry n. (n = 1 to 
     RxStem.count) If more than one printer driver is specified, drivers 
     are separated by a comma. The first printer driver specified is the 
     default printer driver. 


Example use 

/* Enumerate printer devices */
if RxFuncQuery('RxSplEnumDevice') <> 0 then do
 call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
 call LoadLsRxutFuncs
end

ComputerName = '\\ILIDC'

MyRc = RxSplEnumDevice(ComputerName, RxStem)

if MyRc <> '0' then do
 say 'Error from RxSplEnumDevice. RC =' MyRc
 exit 9
end

say 'Number of Printer Devices =' RxStem.count

do i=1 to RxStem.count
 say
 say 'Printer device name   ' RxStem.i.PrinterName
 say 'Logical addresses     ' RxStem.i.LogAddr
 say 'Printer device comment' RxStem.i.Comment
 say 'Printer drivers       ' RxStem.i.Drivers
end

exit 0


Inf-HTML End Run - Successful