CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2006
    Posts
    3

    Browse computer on network

    I am designing a small application which has a browse button, when clicked it should display all the computers(terminals) on a network in a listbox or grid or it should show commondialog from whereI could select a terminal and do further processing. Is there any api call which I could use to get list of all the terminals along with their ipaddresses and name that I could access from my machine ..

    Any help or direction would be appreciated..



    Thanks in advance...

  2. #2
    Join Date
    Nov 2004
    Posts
    28

    Re: Browse computer on network

    Hi,

    To enumerate the Network you need to use WNETXXXXXX API's.

    the APIs required in your case are :

    WNetOpenEnum
    WNetEnumResource


    you need to call it recursively for each domain and for each domain you need to call WNetEnumResource in while loop....

    See the documentation in MSDN and there the Clear and simple example is given.

    check : http://msdn.microsoft.com/library/de..._resources.asp

    and after getting Name of all the computers in network you can use winsock API to get IP address. for that use GetAddrbyHostname Api.

    reply if you get your problem solved. feel free to ask for any doubt. I had alredy created the same before 1yr.

  3. #3
    Join Date
    Apr 2006
    Posts
    3

    Thumbs up Re: Browse computer on network

    Perfect answer thanks for your help !!! got problem solved

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured