0.9b (c) 1995 Peter Childs
The function returns information about a particular printer destination.
Syntax
MyRc = NetGetInfo(NETPRINTDEST, 'prtDestInfo', SrvName, DevName)
Parameters
The parameters specified are:
'prtDestInfo' The REXX variable receiving the result. The variable is divided into:
o prtDestInfo.PrinterName
The printer device name
o prtDestInfo.UserName
The user that submitted the current job, if a job is printing. If a local job is printing the value 'Local User' is used. If no jobs are printing the value of '-none-' is used
o prtDestInfo.LogAddr
The printer logical address (LPT1 for example)
o prtDestInfo.JobId
The current printing job id. If the returned value is 0, no jobs are printing
o prtDestInfo.Status
The printer device status
o prtDestInfo.StatusComment
Print device comment while printing
o prtDestInfo.Comment
Print device description
o prtDestInfo.Drivers
Print driver supported by this device
o prtDestInfo.time
Time (in minutes) current print job has been printing
o prtDestInfo.TimeOut
Print device Time Out (in seconds)
SrvName The server computer name
DevName The printer device name
Note
The server computer name can be specified as '' for a local server or computer.
Example
/* Get Print destination information */ call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs' call LoadLsRxutFuncs NETPRINTDEST = 100 SrvName = '\\FSC30DCR' DevName = 'IBM40191' myRc = NetGetInfo(NETPRINTDEST, 'prtDestInfo', SrvName, DevName) if myRc <> '0' then do say 'Got error from NetGetInfo() ' myRc call DropLsRxutFuncs exit 9 end say say 'Printer device name: ' prtDestInfo.PrinterName say 'Current user job printing: ' prtDestInfo.UserName say 'Printer logical address: ' prtDestInfo.LogAddr say 'Current job id printing: ' prtDestInfo.JobId say 'Print device status: ' prtDestInfo.Status say 'Job Comment: ' prtDestInfo.StatusComment say 'Device describtion: ' prtDestInfo.Comment say 'Supported drivers: ' prtDestInfo.Drivers say 'Time current job printing: ' prtDestInfo.time say 'Print device timeout: ' prtDestInfo.TimeOut call DropLsRxutFuncs call RxFuncDrop 'LoadLsRxutFuncs' exit 0
Example Output
Printer device name: IBM40191 Current user job printing: -none- Printer logical address: LPT3 Current job id printing: 0 Print device status: Processing Job Comment: -none- Device describtion: IBM 4019 LaserPrinter Supported drivers: IBM4019.IBM 4019 LaserPrinter Time current job printing: -none- Print device timeout: 45
Inf-HTML End Run - Successful