Network : How to detect intranet computers

  • Thread starter Thread starter Gopinath Munisifreddy
  • Start date Start date
G

Gopinath Munisifreddy

Hi,
I want to detect all the computers connected to my
intranet using a c# program.How can i do this.


cheers
 
Hi,
If the network is controlled by Active Directory, then you could try a
DirectorySearcher control to enumerate all Computer objects in the
directory.

If it's not, then I think you'll have to resort to using some Win32 API
calls, I can't remember the names of them (maybe NetEnum? Something similar)
but I know you can accomplish this using them.

Regards,
Alex Clark
 
Could you just ping a subnet or a set of IP addresses in a loop? What I
would think is that you can send out the ping on one thread and listen for
the responses on another. This way the pings continue to go out. Just a
thought..
 
Back
Top