' Collection of code snippets by Arne Vajhøj 
' (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
Imports System
Imports System.Runtime.InteropServices

Namespace E
    Class MainClass
        <DllImport("mpr.dll", EntryPoint:="WNetAddConnection")> _
        Public Shared Function WNetAddConnectionA(ByVal lpszNetPath As String, ByVal lpszPassword As String, ByVal lpszLocalName As String) As Integer
        End Function
        Public Shared Sub Main(ByVal args As String())
            WNetAddConnectionA("\\ARNE\ARNE", Nothing, "Z:")
        End Sub
    End Class 
End Namespace
