VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Connect To and Disconnect From Network Drive(s)

Keith Keller  (1 Submission)   Windows API Call/Explanation   Visual Basic 3.0   Unknown Difficulty   Wed 3rd February 2021

Being an NT network administrator and software engineer sure has its advantages.
Visual Basic 4.0 has afforded me the opportunity to create useful apps that
greatly reduce the amount of time it takes to perform those tasks that many of us
perform often. This little app simply uses the Windows 32 API (Win95 or NT 4.0 only)
to open the network resource browse list. You can map network resources or disconnect
from network resources.
Enjoy the code! We've been using it for months in several VB apps on our network
and it works GREAT!

Assumes
Some knowledge of the Windows API would help.

Returns
Opens the respective (Connect To) dialog box or (Disconnect From) dialog box!

Side Effects
not aware of any

API Declarations
Declare Function WNetConnectionDialog Lib "mpr.dll" (ByVal hwnd As Long, ByVal dwType As Long) As Long
Declare Function WNetDisconnectDialog Lib "mpr.dll" (ByVal hwnd As Long, ByVal dwType As Long) As Long
Public Const RESOURCETYPE_DISK = &H1, RESOURCETYPE_PRINT = 0

Rate Connect To and Disconnect From Network Drive(s) (6(6 Vote))
Connect To and Disconnect From Network Drive(s).bas

Connect To and Disconnect From Network Drive(s) Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters