How To Use the WNetUseConnection API to Map a Drive in Visual Basic (256847)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- Microsoft Visual Basic Control Creation Edition for Windows 5.0
- Microsoft Visual Basic Learning Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Standard Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Professional Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Enterprise Edition, 32-bit, for Windows 4.0
This article was previously published under Q256847 SUMMARY
This article demonstrates how to use the WNetUseConnection API function to map a system-supplied drive letter to a network share. In addition, the WNetCancelConnection2 API function is demonstrated to show how to disconnect a mapped drive.
REFERENCESFor additional information on creating network connections with API calls from Visual Basic, click the article number below
to view the article in the Microsoft Knowledge Base:
173011 How To Add and Remove Network Connections
Modification Type: | Minor | Last Reviewed: | 8/30/2004 |
---|
Keywords: | kbAPI kbhowto kbWNet KB256847 |
---|
|