IBM OS/2 LAN Server REXX Utility DLL


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


NETPRINTDEST Enumerate


The function returns a list of print devices.   
Syntax 


MyRc = NetEnumerate(NETPRINTDEST, 'printDestInfo')
MyRc = NetEnumerate(NETPRINTDEST, 'printDestInfo', SrvName)

  
Parameters 
The parameters specified are: 
'printDestInfo'   The REXX variable receiving the result. The variable is 
                  divided into: 
   o printDestInfo.0 
     The number of print devices 
   o printDestInfo.i 
     The print device name entry i, where the variable i has a value from 
     1 to printDestInfo.0 
SrvName           The server computer name 
  
Note 
The server computer name can be specified as '' for a local server or 
computer. 
There call to NetEnumerate with 2 parameters is identical to the call with 
3 parameters where SrvName is set to ''. 
Example   


/* List print destination names */
call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
call LoadLsRxutFuncs

NETPRINTDEST = 100
SrvName      = '\\DOMAIN_CONTRLR'

myRc = NetEnumerate(NETPRINTDEST, 'printDestInfo', SrvName)

if myRc <> '0' then do
 say 'Got error from NetEnumerate() ' myRc
 call DropLsRxutFuncs
 exit 9
end

if printDestInfo.0 = 0 then do
 say 'No print destinations available'
 call DropLsRxutFuncs
 exit 0
end

say 'Number of print destination names: ' printDestInfo.0
say

do i=1 to printDestInfo.0
 say printDestInfo.i
end

call DropLsRxutFuncs
call RxFuncDrop 'LoadLsRxutFuncs'

exit 0

  
Example Output   


Number of print destination names:  1

LPT1Q



Inf-HTML End Run - Successful