uint paramErrorIndex;
uint returnCode = NetUseAdd(null, 2, ref useInfo, out paramErrorIndex);
if (returnCode != 0)
{
throw new Win32Exception((int)returnCode);
}
Alternative Managed API:
TODO
The NetUseAdd function establishes a connection between the local computer and a remote server. You can specify a local drive letter or a printer device to connect. If you do not specify a local drive letter or printer device, the function authenticates the client with the server for future connections.
5/8/2009 2:10:37 PM - Christian Rodemeyer-84.152.7.204
The WNetAddConnection2 function makes a connection to a network resource. The function can redirect a local device to the network resource.