[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
NETREDIR()
Redirects a local device to a server
------------------------------------------------------------------------------
Syntax
NETREDIR(<cLocalDevice>, <cServerDevice>,
[<cPassword>]) --> lRedirection
Arguments
<cLocalDevice> Designates the name of the local device (LPTn:,
PRN:, or d:).
<cServerDevice> Designates the complete path for the server
(\\<Servername>\<Devicename>).
<cPassword> Can designate a password when it is required by the
server.
Returns
NETREDIR() returns .T. when the specified local device has been
redirected to the selected server device.
Description
NETWORK REDIRECTION
Under PC LAN/MS-NET, server devices can be redirected to local devices
using the NET USE <local> <remote> command. Exactly the same thing can
be accomplished using the NETREDIR() function from within an
application. The function returns .T. when the redirection has been
carried out. A return of .F. could occur for several reasons:
. The designated drive is not accepted. Either this drive is
already physically available or LASTDRIVE in CONFIG.SYS has to be set
higher.
. The device is not available on the server. Use NET SHARE on
the selected server to review all the devices available there.
. The password is incorrect. Check the password that the server
has designated for the device.
. Too many devices have already been allocated. In this
instance you must change some of the flags with the NET START command
(see PC LAN/MS-NET manual).
Note
. The redirections accomplished here are not listed when you use
NET USE.
Examples
. Create a new drive H:
? NETREDIR("H:", "\\SERVER\DRIVEC") // .T. if OK
. In this example, the server device asks for a password:
? NETREDIR("H:", "\\SERVER\DRIVEC", "SECRET") // .T. if OK
. Allocate a server printer to LPT2:
? NETREDIR("LPT2:", "\\SERVER\PRINTER") // .T. if OK
See Also:
NETCANCEL()
NETLOCNAME()
NETRMTNAME()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson