by Michael Tutty (2 Submissions)
Category: Windows API Call/Explanation
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (23 Votes)
Allows you to look up a DNS entry by name (www.whatever.com => 100.100.0.1) or by IP (100.100.0.1 => www.whatever.com). Includes some code found right here on VBC!
Inputs
Either a host name or the IP address
Assumes
You should have a TCP stack installed before trying this (i.e., can you surf?), or it'll puke.
Code Returns
Either an IP address or a host name (are you seeing a pattern here?)
Side Effects
You may become dizzy or irritable if you use this class. Make sure to drink lots of water, and eat your vegetables.
API DeclarationsLots. See code
Download IPHostResolver (2 KB)