Imports system
Imports System.Net.DNS

Private Function GetIPAddress() As String
Dim oAddr As System.Net.IPAddress
Dim sAddr As String
With system.Net.DNS.GetHostByName(system.Net.DNS.GetHostName())
oAddr = New System.Net.IPAddress(.AddressList(0).Address)
sAddr = oAddr.ToString
End With
GetIPAddress = sAddr
End Function

Private Function GetName() as string
Dim shostname As String
shostname = system.Net.DNS.GetHostName
return shostname
End Function

to list the shared folder, just Dir("\\" & myHostTarget ) and filter with folder attribute.