Sample code for 30+ languages & platforms
VB.NET

DNS Lookup

Do a DNS lookup to resolve a hostname to an IP address.

Chilkat VB.NET Downloads

VB.NET
' This example requires the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.

Dim socket As New Chilkat.Socket

Dim maxWaitMs As Integer = 10000
Dim ipAddr As String = socket.DnsLookup("www.chilkatsoft.com",maxWaitMs)
If (socket.LastMethodSuccess <> True) Then
    Debug.WriteLine(socket.LastErrorText)
    Exit Sub
End If


Debug.WriteLine("IP Address: " & ipAddr)