Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Initialize connection to file share
- NETRESOURCE nr = new NETRESOURCE();
- nr.dwType = ResourceType.RESOURCETYPE_DISK;
- nr.lpRemoteName = "\192.168.1.1";
- string user = "user B";
- string password = "password for user B";
- WNetUseConnection(IntPtr.Zero, nr, password, user, 0, null, null, null);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement