|
-
Feb 18th, 2006, 01:56 PM
#1
Thread Starter
Junior Member
[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.
-
Feb 18th, 2006, 03:17 PM
#2
Re: need help in getting the host name of a remote machine
 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.
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
|