Results 1 to 7 of 7

Thread: [winsock] Getting the machine name on which I'm connected

Hybrid View

  1. #1
    New Member
    Join Date
    Oct 2002
    Location
    Saudi Arabia
    Posts
    8

    Re: [winsock] Getting the machine name on which I'm connected

    You need to do a DNS reverse lookup. There is a third party control to do that: http://www.dart.com/dns.asp
    Yet, with a bit more searching on the net, you will certainly a free solution via the windows API.
    From the command prompt nbtstat -a xxx.xxx.xxx.xxx (Where the xxx are the IP address)
    Also from command prompt: nslookup

  2. #2

    Thread Starter
    New Member
    Join Date
    Oct 2005
    Posts
    2

    Re: [winsock] Getting the machine name on which I'm connected

    Thanks for the answers.

    I've found some API funktions
    GetHostByName() and
    GetHostByIp()

    They have also solved my problem

  3. #3
    Lively Member nvierros's Avatar
    Join Date
    Nov 2005
    Location
    Melbourne, Australia
    Posts
    110

    Re: [winsock] Getting the machine name on which I'm connected

    hi try this:


    VB Code:
    1. dim localpc as string
    2.  
    3. localpc = environ("computername")

  4. #4
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: [winsock] Getting the machine name on which I'm connected

    Quote Originally Posted by nvierros
    hi try this:


    VB Code:
    1. dim localpc as string
    2.  
    3. localpc = environ("computername")
    environ can be changed, dont use it.

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