devxlogo

Connecting Network Drives

Connecting Network Drives

Question:
When I issue the command ‘NET USE’ in msdos, I get a message that a specific drive is disconnected, how can I connect that drive in VB? If I don’t connect it, I can’t open the file.

Answer:
Take a look at the WNetAddConnection API call. That will add a connection to a network drive. Those calls are independent of the NET USE functionality. Note that the declares for the calls will be different for a 16- or 32-bit program, make sure you’re using the right one.

See also  How to Block Websites During Certain Hours on a Mac Computer
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist