Hi!!
well, i am looking for a sample code which would enable me to get a remote computer's name (which is in network) using windows API.
thanking u,
peri
Printable View
Hi!!
well, i am looking for a sample code which would enable me to get a remote computer's name (which is in network) using windows API.
thanking u,
peri
This enumerates (lists) the names of all the computers in the network.
http://www.mvps.org/vbnet/code/netwo...serverenum.htm
Jim: Do you need to be running NT is order for the code listed on your link to work? I'm running Win98, and when I tried it, I received the error message: "Can't find Dll entry point NetServerEnum in NetApi32."
Hack - it's for NT & Win2K only. On that same site, if you look under shell programming, there is an example using the shell to enumerate the network, which works for all systems even Win95.
Jim: Duh...under your initial link, it even says under OS Restrictions that it is for WinNT. I think I need to get my eyes cleaned. :)
Anyway, I got the link for Win9x, or others. The OS Restrictions for this are None. So, for those of you that might want to get the names of remote machines, but are not running WinNT or Win2K, try this link:
http://www.mvps.org/vbnet/index.html...serverenum.htm
Thanks Jim!! :D
I forgot to add: Click Win32 Shell once you get there. Actually, the link I just posted is the same one Jim posted. I didn't realize that until I tried it. For some odd reason, the links don't change when you change Web pages in this section, on this site.
This might help: http://www.planetsourcecode.com/xq/A...s/ShowCode.htm (my own code :p)