VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Connect or disconnect a network drive

by Karthikeyan (187 Submissions)
Category: Windows API Call/Explanation
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Fri 15th December 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Connect or disconnect a network drive

API Declarations


(ByVal hwnd As Long, ByVal dwType As Long) As Long
Private Declare Function WNetDisconnectDialog Lib "mpr.dll" (ByVal hwnd As Long, ByVal dwType As Long) As Long


Rate Connect or disconnect a network drive



'Connect Network Drive
xyz = WNetConnectionDialog(Me.hwnd, 1)
End Sub

Private Sub Command2_Click()
'Disconnect Network Drive
xyz = WNetDisconnectDialog(Me.hwnd, 1)
End Sub

Download this snippet    Add to My Saved Code

Connect or disconnect a network drive Comments

No comments have been posted about Connect or disconnect a network drive. Why not be the first to post a comment about Connect or disconnect a network drive.

Post your comment

Subject:
Message:
0/1000 characters