HostConnectDrive Method (String, String) |
Creates a connection to a network resource. The function can redirect a local device to a network resource.
Namespace:
Alphaleonis.Win32.Network
Assembly:
AlphaFS (in AlphaFS.dll) Version: 2.0
Syntax public static string ConnectDrive(
string localName,
string remoteName
)
Public Shared Function ConnectDrive (
localName As String,
remoteName As String
) As String
public:
static String^ ConnectDrive(
String^ localName,
String^ remoteName
)
static member ConnectDrive :
localName : string *
remoteName : string -> string
Parameters
- localName
- Type: SystemString
The name of a local device to be redirected, such as "F:". When localName is or
string.Empty, the last available drive letter will be used. Letters are assigned beginning with Z:, then Y: and so on.
- remoteName
- Type: SystemString
The network resource to connect to. The string can be up to MAX_PATH characters in length.
Return Value
Type:
StringIf
localName is
or
string.Empty, returns the last available drive letter,
otherwise.
See Also