| xHarbour Reference Documentation > Function Reference |
![]() |
![]() |
![]() |
Establishes a connection to a server.
NetRedir( <cLocal> , ;
<cServer> , ;
[<cPassword>], ;
[<lShowError>] ) --> lSuccess
The function returns .T. (true) if the connection to the server is successfully established, otherwise .F. (false) is returned.
| See also: | NetCancel(), NetRmtName() |
| Category: | CT:Network , Network functions |
| Source: | ct\ctnet.c |
| LIB: | xhb.lib |
| DLL: | xhbdll.dll |
// The example connects the local drive "K:" to a server
PROCEDURE Main
// no error handling
? NetRedir( "Z:", "\\SERVER01\DEVELOPER" )
// runtime error if connection fails
? NetRedir( "Z:", "\\SERVER01\DEVELOPER", "Password" , .T. )
RETURN
http://www.xHarbour.com