How can I get a remote PC's IP number. I know the PC's name.
Any idea's?
Printable View
How can I get a remote PC's IP number. I know the PC's name.
Any idea's?
Well, you can use the normal winsock approach, which is not very pretty. Works great though.
I just couldnt be bothered to copy and paste.
What I am bothered to do however is tell you that you can Shell the ping command, and ping the computer's name. The response will come back from the system's IP address.
If you goto a dos prompt, and do ping www.microsoft.com, the IP responds.
So you could ping the name, pipe the results into a file, and then parse the file.
- jamie
Quite new to the Winsock method, have you got any code I could have a look at that will do the trick
Thanks
Eh...
Well the only thing that the winsock method and the winsock control have in common is the word winsock :)
They're quite different.
The winsock stuff is in fact awful.
Go to a dos prompt, and type :
ping www.microsoft.com > something.txt
then open something.txt
You should then be able to do the above programatically. If you can't .... I don't think you should be messing with winsock yet :)
- jamie