• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1013
  • Last Modified:

how to detect all IP of a LAN in C or C++

Hello experts, I have a question , I need to know how to detect all the PCs connected in the network...
In windows you can use the explorer to see all the groups and computers in the network, how can I obtain this information programatically ?
Is there a call to windows API or something to do this ?
0
daniel_becerra
Asked:
daniel_becerra
  • 3
1 Solution
 
dimitry_dimitryCommented:
system("ipconfig /all > result.txt")

and parse it
0
 
daniel_becerraAuthor Commented:
dimitry that's to get my current configuration , not get the pcs that belong to the network....
Kumvjuec I had found that sample before but could you explain what result would that throw ? Would it be the PCs in the network ? I tried to run that sample and I got no results...
0
 
kumvjuecCommented:
0
 
kumvjuecCommented:
Or see this, this has worked on my computer :-)
Hope this will help.

http://www.codeproject.com/csharp/csenumnetworkresources.asp
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now