Advertisement
Guest User

Untitled

a guest
Feb 1st, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. // Initialize connection to file share
  2. NETRESOURCE nr = new NETRESOURCE();
  3. nr.dwType = ResourceType.RESOURCETYPE_DISK;
  4. nr.lpRemoteName = "\192.168.1.1";
  5.  
  6. string user = "user B";
  7. string password = "password for user B";
  8.  
  9. WNetUseConnection(IntPtr.Zero, nr, password, user, 0, null, null, null);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement