Results 1 to 2 of 2

Thread: [RESOLVED] need help in getting the host name of a remote machine

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2006
    Posts
    30

    Resolved [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.

  2. #2
    Frenzied Member the182guy's Avatar
    Join Date
    Nov 2005
    Location
    Cheshire, UK
    Posts
    1,473

    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:
    1. 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.
    Chris

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width