IBM OS/2 LAN Server REXX Utility DLL


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


NETUSE Delete


The function ends a connection between a local or UNC device name and a 
shared resource.   
Syntax 

MyRc = NetDelete(NETUSE, SrvName, DeviceName, Force)

  
Parameters 
The parameters specified are: 
SrvName      The server computer name 
DeviceName   The device name that contains the following information: 
   o If the connection is a device name connection, the name specified 
     must be the name of the local device 
   o If the connection is a UNC connection (either implicit or explicit), 
     the name must be the UNC name 
Force        Is one of three values specifying the type of disconnection. 
             The following force values are available: 
   0       USE_NOFORCE 
           Maintains the connection in a dormant state, decrementing the 
           usecount. A dormant session can quickly be activated as soon as 
           reconnection is needed, improving system performance 
   1       USE_FORCE 
           Connection is removed only if no file, directory, or drive is 
           opened. The usecount is decremented for a local device name 
           connection and forced to 0 for a UNC connection 
   2       USE_LOTS_OF_FORCE 
           All files, directories, and drives open on the connection are 
           forced closed 
  
Note 
The server computer name can be specified as '' for a local server.   
Example   

/* Stop using a UNC name */
call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
call LoadLsRxutFuncs

NETUSE = 270
SrvName = '\\ILIDC'
DeviceName = '\\ILIDC\BOOKS'
Force = 1

myRc = NetDelete(NETUSE, SrvName, DeviceName, Force)

if myRc <> '0' then do
 say 'Got error from NetDelete() ' myRc
 call DropLsRxutFuncs
 exit 9
end
else do
 say 'Net Use stopped successfully'
 say
end

call DropLsRxutFuncs
call RxFuncDrop 'LoadLsRxutFuncs'

exit 0

  
Example Output   

Net Use stopped successfully



Inf-HTML End Run - Successful