Click here to Skip to main content
15,563,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HOW to create a program to determine if a computer (E.g. Computer1 with ip 192.168.1.5) is connected to the LAN from another computer (E.g Server with ip 192.168.1.2) ?

What I have tried:

i haven't tried any thing yet because i have no idea where to start, im using a vmware environment with two windows 7 computers, one is act as a server other is a client computer.
Posted
Updated 12-Apr-17 0:17am
Comments
Richard MacCutchan 12-Apr-17 3:29am    
Google for sockets, network connect etc.

1 solution

Try to establish a connection to a service running on the other system or use the Ping Class (System.Net.NetworkInformation)[^].

Note that both methods may not work when filtered out by firewalls.

With Windows you can also use the Net view[^] command. Without any options it will display a list of computers in your current domain. But execution requires usually some time and you have to resolve the system names to get the IPs.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900