IBM OS/2 LAN Server REXX Utility DLL


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


NETCHARDEV Get Info


The function retrieves information about a particular serial device in a 
shared serial device queue on a server.   
Syntax 

MyRc = NetGetInfo(NETCHARDEV, 'charDevInfo', SrvName, DeviceName)

  
Parameters 
The parameters specified are: 
'charDevInfo'  The REXX variable receiving the result. The variable is 
               divided into: 
   o charDevInfo.dev 
     The device name 
   o charDevInfo.status 
     The status of the device 
   o charDevInfo.username 
     The current user name of the device 
   o charDevInfo.time 
     The number of seconds the current application has been connected to 
     the serial device 
SrvName        The server computer name 
DeviceName     The name of the device 
  
Note 
The server computer name can be specified as '' for a local server or 
computer.   
Example   

/* Get the serial device information */
call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
call LoadLsRxutFuncs

NETCHARDEV = 130
SrvName    = '\\ILIDC'
DeviceName = 'COM1'

myRc = NetGetInfo(NETCHARDEV, 'charDevInfo', SrvName, DeviceName)

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

say
say 'The device name:   ' charDevInfo.dev
say 'Device status:     ' charDevInfo.status
say 'Current user name: ' charDevInfo.username
say 'Time in use:       ' charDevInfo.time

call DropLsRxutFuncs
call RxFuncDrop 'LoadLsRxutFuncs'

exit 0

  
Example Output   

The device name:    COM1
Device status:      Idle
Current user name:  -none-
Time in use:        0



Inf-HTML End Run - Successful