Results 1 to 4 of 4

Thread: IP Number from PC Name

  1. #1

    Thread Starter
    Hyperactive Member parkes's Avatar
    Join Date
    Jan 1999
    Location
    Unitied Kingdom
    Posts
    303
    How can I get a remote PC's IP number. I know the PC's name.

    Any idea's?
    Thanks in advance for any help provided.

    VB 6 Enterprise Edition SP4
    ADO, SQL 7/2000, ASP and some JavaScript


    >> Life goes on, but for how long? <<
    If you can smile when things go wrong, you have someone in mind to blame

  2. #2
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    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
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  3. #3

    Thread Starter
    Hyperactive Member parkes's Avatar
    Join Date
    Jan 1999
    Location
    Unitied Kingdom
    Posts
    303
    Quite new to the Winsock method, have you got any code I could have a look at that will do the trick

    Thanks
    Thanks in advance for any help provided.

    VB 6 Enterprise Edition SP4
    ADO, SQL 7/2000, ASP and some JavaScript


    >> Life goes on, but for how long? <<
    If you can smile when things go wrong, you have someone in mind to blame

  4. #4
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    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
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

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