IBM OS/2 LAN Server REXX Utility DLL


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


RxSplCreateDevice()


The function creates a printer device. The printer drivers used must be 
installed before using this function. 
Syntax 


MyRc = RxSplCreateDevice(ComputerName, RxStem)


Parameters 
The required parameter values are: 
ComputerName   Must be either be specified as '' for a local computer or 
               '\\computername'. For the remote case, administrator 
               authority is required 
'RxStem'       A REXX variable which is divided into: 
   o RxStem.PrinterName 
     The printer name 
   o RxStem.LogAddr 
     The printer port logical address. (For example LPT2). The port 
     address must exist 
   o RxStem.Comment 
     The printer device description 
   o RxStem.Drivers 
     The printer drivers supported by this print device. If more than one 
     printer driver is specified, the ',' must be used as separator 
   o RxStem.TimeOut 
     The printer device timeout value 

Example use 

/* Create a printer device */
if RxFuncQuery('RxSplCreateDevice') <> 0 then do
 call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
 call LoadLsRxutFuncs
end

ComputerName       = '\\ILIDC'
RxStem.PrinterName = 'TestDev'
RxStem.LogAddr     = 'LPT3'
RxStem.Comment     = 'Test of REXX Printer Device create'
RxStem.Drivers     = 'IBMNULL,IBM4019.IBM 4019 LaserPrinter'
RxStem.TimeOut     = 54

MyRc = RxSplCreateDevice(ComputerName, RxStem)

if MyRc <> '0' then do
 say 'Error from RxSplCreateDevice. RC =' MyRc
 exit 9
end
else do
 say 'Printer Device' RxStem.PrinterName 'created successfully'
end

exit 0


Inf-HTML End Run - Successful