Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Sep 2006
    Location
    New York, New York, USA
    Posts
    76
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Connect to Network Drive Without Mapping (VB6 SP6)

    I need to programmatically connect to a network server/share, but, due to policy, can't establish a mapping, even temporarily. I know I can use an API call like "WNetAddConnection2" to locate a server and map a logical drive to it, but this violates the "no mapping" rule. The goal is to be able to read files on the remote server, then break the connection. The user should be unaware of the remote connection, and unable to see this connection in Windows (e.g. Explorer, Connections, etc.).

    Does anyone know of an API like WNetAddConnection2 that will allow me to connect to a remote server, ideally with a UNC path, without having to map a drive?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Connect to Network Drive Without Mapping (VB6 SP6)

    You are not required to specify a drive letter when using WNetAddConnection2. See Connect to network share without using drive letter. Note: do not click the prominent "View Solution" buttons (they lead to a registration form) but scroll down until you see the replies.

  3. #3
    Star Lounger
    Join Date
    Sep 2006
    Location
    New York, New York, USA
    Posts
    76
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Connect to Network Drive Without Mapping (VB6

    Hans, you are spot on!

    Thanks for the fast assistance.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •