How to Get?

Hello,

     Can any one give the C# code that gets all the computers name connected to a system. Thanks in advance.


Regards & Thanks,
Shaji Kumar.V.K





Answer this question

How to Get?

  • Craig Harris

    What do you mean by connected.. At the socket level or a higher level where a network share is used ... If it is at the socket level, netstat command line utility gives all the sockets that are connected: you can get the same info from managed code using NetworkInformation class
  • Syed Wajahat Iftikhar

    Hmmm... This is an interesting question.
    There are no Managed API.s that I know of that can get this information.
    That said when you open the explorer you can see some connected computers
    so I wonder how the explorer is doing that. I will find out, but
    please tell me why you want to do this.

    Thanks



  • CBrookes86

    I talked to a couple of people in the Active Directory team.

    1) First there is not such universal term as "Connected" computers.
    This can be computers on local subnet, intranet, extranet and even Internet.
    I consider the amazon.com website as "Connected" in some fashion.

    2) Using the LDAP queries, you can perhaps enumerte the Forest of the domains
    and for each domain get all the computers in the domain. But I don't think this is what you want.

    So in short, there is no way to get "Connected" computers unless you can further
    qualify your requirement to crisply define what the connectedness really means to you.


  • luoqi

    Hai Prasad,

         I am in project that shows all the systems connected to a system. The application displays all the information about the selected system, what exactly the explorer does. For that i need to collect all the system names/IP address connected to my system. Please give me the code, if you got the solution.


    Thanks
    Shaji Kumar.V.K

  • Nico_Shao

    Definitely there is no System.Net api.
    I wonder if you can do this through managed at all...  I am still researching

  • How to Get?