gpchicago08
asked on
Check before UnMapping Network Drive Letter
I have the following code to Un-Map a drive letter. What I would like assistance with is code to determine if DriveLetter is actually a mapped network drive.
Public Function UnMapDrive(ByVal DriveLetter As String) As Boolean
Dim rc As Integer
''''''' - code here to determine if DriveLetter is actually a mapped network drive '''''''
rc = WNetCancelConnection2(Driv eLetter & ":", 0, ForceDisconnect)
If rc = 0 Then
Return True
Else
Return False
End If
End Function
Public Function UnMapDrive(ByVal DriveLetter As String) As Boolean
Dim rc As Integer
''''''' - code here to determine if DriveLetter is actually a mapped network drive '''''''
rc = WNetCancelConnection2(Driv
If rc = 0 Then
Return True
Else
Return False
End If
End Function
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER