While you can use the Winsock control to do a simple HostName to IPv4 address lookup, more complex DNS queries take more work. This is a sample DNS lookup class (DNSLookup) that might get you started if you have this sort of need.
It does not try to be a complete implementation, but rather provides just one Property, an Enum, and two Methods:
Property LeadingZeros As Boolean
Default = False.
If true leading zeros are not added to each colon-separated part of a returned IPv6 address (HostToIPv6). If False then each group of hex digits will have leading zeros padding it to 4 digits.
Enum DNS_STATUS
Names some of the more common DNS error results as well as some extended (negative) values.
Method IPv4ToHost(ByVal IPv4 As String, ByRef HostName As Variant) As DNS_STATUS
Looks up the IPv4 address and returns HostName if found. HostName can be a String or a Variant.
Method HostToIPv6(ByVal HostName As String, ByRef IPv6 As Variant) As DNS_STATUS
Looks up the HostName and returns an array of the IPv6 addresses found. Normally only one result is returned but multiples are possible for multihomed hosts. The IPv6 parameter must be a dynamic String array or a Variant.
The class is wrapped in a sample test project here (attached). You could just as easily incorporate it into an ActiveX DLL project however, making it available for many programs, in WSH scripts, ASP pages, etc.
It may have a few bugs, but it ought to serve as a starting point for more robust versions. Be sure to look at the comments in Form1.