Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Book 4-Appendices - <b>netcancel()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 NETCANCEL()
 Releases the redirection of a local device
------------------------------------------------------------------------------
 Syntax

     NETCANCEL(<cLocalDevice>) --> lReleased

 Argument

     <cLocalDevice>  Designates the name for the local device, for which
     an existing redirection in the network is released.

 Returns

     NETCANCEL() returns .T. when a redirection existed for the designated
     device and it was released.

 Description

     NETWORK CANCEL REDIRECTION
     With NETCANCEL(), an existing redirection for a local device can be
     released.  You call the function by simply specifying the device name,
     d: or LPTn:.

     If the return value is .F., the device did not exist or was not
     previously redirected.

 Note

     WARNING!  Make sure that no drive on which files are still open is
     rendered invalid when you use NETCANCEL().  This situation leads to
     problems, and under certain circumstances, to data loss.

 Example

     Make all redirected printer devices local

     nCounter    :=  0
     cLocalName  :=  NETLOCNAME(nCounter)
     DO WHILE .NOT. EMPTY(cLocalName)
        IF cLocalName $"LPT1:LPT2:LPT3:PRN:"   // Is device a printer?
           NETCANCEL(cLocalName)
        ENDIF
        nCounter    := nCounter +1
        cLocalName  := NETLOCNAME(nCounter)
     ENDDO

See Also: NETREDIR() NETLOCNAME()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson