|
-
April 25th, 2006, 09:22 PM
#1
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...
-
April 26th, 2006, 01:00 AM
#2
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.
-
April 26th, 2006, 09:47 PM
#3
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|