CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    May 2001
    Posts
    4

    IP address from domain name

    I need to resolve the ip address from a domain name using visual basic 6.0. I am not very familiar with the using of visual basic library, the ping function in vbInternet class of the activeX library and GetIpFromHostName function of vbInternet in the activeX DLL in visual basic. Can someone guide me with a step-by-step using of the above functions?(eg. what library to load because i cannot find the function anywhere, how to load it out and the source of the library as i do not know whether it is a built-in library or one which had been written by someone else) Thanks.


  2. #2
    Join Date
    Feb 2000
    Location
    Ireland
    Posts
    808

    Re: IP address from domain name

    Goto http://www.mvps.org/vbnet and search for "How to Obtain the Host Name from an IP Address"


  3. #3
    Join Date
    Feb 2000
    Location
    Ireland
    Posts
    808

    Re: IP address from domain name

    Sorry wrong way round. the article is "How to Resolve a Hostname Into an IP Address"


  4. #4
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    Re: IP address from domain name

    ...the same: the forward address is:
    http://www.mvps.org/vbnet/code/network/iplookup.htm
    (I tested: it is great)

    Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, Bruno Paris and all the other wonderful people who made and make Codeguru a great place. Come back soon, you Gurus.
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

  5. #5
    Join Date
    Apr 2000
    Posts
    737

    Re: IP address from domain name

    there is two zip files, one vbLib.zip contains the source code for the library. second vbLibB.zip contains the build version. for your case, I think the best is to unzip all the source files in vbLib.zip and find the functions in vbInternet.cls

    or if you want to add the library to vb program, then unzip all the files in vbLibB.zip to your system directory, for instance, c:\windows\system.

    registr it by typing

    regsvr32 c:\windows\system\vbdll.lib.

    in vb program, in the menu Project\References, click on the vbLib, then in your program

    dim vbInternet as new vbInternet

    your should be able to call

    vbInternet.Ping(Ip,timeout)
    and so on

    HTH

    cksiow
    http://vblib.virtualave.net - share our codes


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

Featured