devxlogo

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.

Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.

See also  Five Early Architecture Decisions That Quietly Get Expensive

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.