Help from there, i want the IP Address of all computers which are connected in LAN with me. Its really urgent for me. I using one kind of coding which returns me IP Address of only one computer, but when i enter a Computer Name. The source code of that one is as follows:
*************** *************** *************** *************** *************** *************** **
So I am requesting to you please help me as early as possible....
*************** *************** *************** *************** *************** *************** **
Code:
Dim s1, s2 As String
Dim IPHost As IPHostEntry = Dns.GetHostEntry("Modelling")
s1 = IPHost.HostName.ToString
Dim aliases() As String
aliases = IPHost.Aliases
Dim addr() As IPAddress
addr = IPHost.AddressList
s2 = addr(0).ToString
lblnm.Text = s1 & s2
Dim ep As EndPoint = New IPEndPoint(addr(0), 80)
Dim sock As Socket = New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
sock.Connect(ep)
lblname.Text = s1 & s2 & "Not Connected"
sock.Shutdown(SocketShutdown.Both)
Comment