[RESOLVED] need help in getting the host name of a remote machine
Hi,
This is first query.....
Can anyone help me in getting the hostname of a machine that is connected to my machine.Actually Iam using winsock and i am sending a requst to every machine in my lan. if the socket is accepted then i can get the Ip add but i am ot able to get the host name
using winsock.Localhost does not give any result.
Re: need help in getting the host name of a remote machine
Quote:
Originally Posted by techie_krishna
Hi,
This is first query.....
Can anyone help me in getting the hostname of a machine that is connected to my machine.Actually Iam using winsock and i am sending a requst to every machine in my lan. if the socket is accepted then i can get the Ip add but i am ot able to get the host name
using winsock.Localhost does not give any result.
well winsock.localhost doesnt exist, its Winsock.LocalHostName - and that will give your computer name. Which is not what want. To get the computer name/host name you should use
VB Code:
Text1.Text = Winsock1.RemoteHost
I think this gives the hostname, if not then you need to send a request for the hostname and you should program it the remote host client/server to send back Winsock.LocalHostName so that will send the hostname.