Advertisement
2002ASP Windows System Services #962

MAP NETWORK DRIVE WITH VB

Well the simple way to map network drives with vb.

AI

ИИ-обзор: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Исходный код
original-source
Private Sub cmdConnect_Click()
  Dim x As Long
  x = WNetAddConnection("\\CPU1\C\WINDOWS\DESKTOP", "", "R:")
  If x <> 0 Then
    MsgBox "connect failed"
  End If
End Sub
Private Sub cmdDisconnect_Click()
  Dim x As Long
  x = WNetCancelConnection("R:", 0)
  If x <> 0 Then
    MsgBox "Disconnect failed"
  End If
End Sub
Оригинальные комментарии (3)
Восстановлено из Wayback Machine