[<<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()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson