ERFORDERLICHE
OBJEKTE
1 Commandbutton (Command1)
FORM-CODE
Private Declare Function WNetAddConnection Lib "mpr.dll" _
Alias "WNetAddConnectionA" (ByVal lpszNetPath As String, _
ByVal lpszPassword As String, ByVal lpszLocalName As String) _
As Long
Private Sub Command1_Click()
l = WNetAddConnection("\\PC-Name\Freigabename", "", "E:")
If L <> 0 Then MsgBox "Fehler beim Verbinden !", vbCritical
End Sub
'für passwortgeschützte Freigaben:
l = WNetAddConnection("\\PC-Name\Freigabename", "Passwort", "E:")
|