I want to create a chat application in which there is a ComboBx
. I want to fill it with all the computer names in a network. How can I accomplish this in C#?
Click Start, right-click Computer, and then click Properties. The computer name appears under Computer name, domain, and workgroup settings.
Click the Windows Start button, then "All Programs" and "Accessories." Right-click on "Command Prompt" and choose "Run as Administrator." Type "nslookup %ipaddress%" in the black box that appears on the screen, substituting %ipaddress% with the IP address for which you want to find the hostname.
The best option for discovering other computers in a LAN running the same application is probably mDNS.
Have a look at the Bonjour SDK for Windows which comes with a COM library usable from C# and sample code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With