[Resolved] Detecting Computers On Lan
I have made a chat program to work over my local network, the thing is the only way it works is if you have the computers IP address or by using the built in IP scanner (WHICH CAN TAKE AGES).
I was wondering if there was a way to find all the IP addresses on the network so it can quickly go through them and see which people are running my chat client and so we can chat till our hearts content.
If any dos command available please post...... :)
Advance thanks :)
Re: Detecting Computers On Lan
Which programming language do you need it? Have you tried searching here or googling for it?
Re: Detecting Computers On Lan
If this is running over a LAN why not use the Computer name(s) rather than IP Addresses?
Re: Detecting Computers On Lan
This is for VB6.0, and this is for C#, take your pick.
Re: Detecting Computers On Lan
Quote:
Originally Posted by dee-u
Which programming language do you need it? Have you tried searching here or googling for it?
I am sorry for didnt mention the language.... I need vb only.... Thanks for your links.... Try it now... :)
Re: Detecting Computers On Lan
see my signature for the IP / Subnet Range link. one of the parts generates a list of IP's.
once you have the list you can ping them and see if they respond.
i'd do it in a backgroundworker so as not to make your app appear slow, and set the timeout to a low value if the computers are on the same network.
Code:
Dim ipLIST As List(Of String) = ipRange("192.168.1.1", "255.255.255.0") 'get list
Dim ipFND As New List(Of String)
'in a backgroundworker
For idx = 0 To ipLIST.Count - 1
If My.Computer.Network.Ping(ipLIST.Item(idx), 1) Then
'found one
ipFND.Add(ipLIST.Item(idx))
End If
Next
Re: Detecting Computers On Lan
[QUOTE=dbasnett]see my signature for the IP / Subnet Range link. one of the parts generates a list of IP's.
once you have the list you can ping them and see if they respond.
i'd do it in a backgroundworker so as not to make your app appear slow, and set the timeout to a low value if the computers are on the same network.
Thanks for your reply..... Buddy I need vb code for finding out... But your IP / Subnet Range link is vb.net...
Re: Detecting Computers On Lan
Quote:
Originally Posted by dee-u
This is for VB6.0, and
this is for C#, take your pick.
That C# code works perfectly.... Thanks dee-u