HostConnectTo Method (IntPtr, String, String, String, Boolean, Boolean, Boolean) |
Creates a connection to a network resource.
Namespace: Alphaleonis.Win32.NetworkAssembly: AlphaFS (in AlphaFS.dll) Version: 2.0
Syntax public static void ConnectTo(
IntPtr winOwner,
string remoteName,
string userName,
string password,
bool prompt,
bool updateProfile,
bool saveCredentials
)
Public Shared Sub ConnectTo (
winOwner As IntPtr,
remoteName As String,
userName As String,
password As String,
prompt As Boolean,
updateProfile As Boolean,
saveCredentials As Boolean
)
public:
static void ConnectTo(
IntPtr winOwner,
String^ remoteName,
String^ userName,
String^ password,
bool prompt,
bool updateProfile,
bool saveCredentials
)
static member ConnectTo :
winOwner : IntPtr *
remoteName : string *
userName : string *
password : string *
prompt : bool *
updateProfile : bool *
saveCredentials : bool -> unit
Parameters
- winOwner
- Type: SystemIntPtr
Handle to a window that the provider of network resources can use as an owner window for dialog boxes. - remoteName
- Type: SystemString
A network resource to connect to, for example: \\server or \\server\share. - userName
- Type: SystemString
The user name for making the connection. If userName is , the function uses the default
user name. (The user context for the process provides the default user name)
- password
- Type: SystemString
The password to be used for making the network connection. If password is , the function
uses the current default password associated with the user specified by userName.
- prompt
- Type: SystemBoolean
always pop-ups an authentication dialog box. - updateProfile
- Type: SystemBoolean
successful network resource connections will be saved. - saveCredentials
- Type: SystemBoolean
When the operating system prompts for a credential, the credential should be saved by the credential manager when true.
Exceptions See Also