Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

I use this .NET code to get the IP address of all my current DNS server:

Imports System.Net.NetworkInformation
Imports System.Net

Dim nics As NetworkInterface()
Dim dnsIPs As IPAddressCollection

nics = NetworkInterface.GetAllNetworkInterfaces()

For Each nic As NetworkInterface In nics
If (nic.OperationalStatus = OperationalStatus.Up) Then
	dnsIPs = nic.GetIPProperties().DnsAddresses
	For Each dnsIp As IPAddress In dnsIPs
		MessageBox.Show(dnsIp.ToString())
	Next
End If
Next

It works great but in .NET, I need to do the same also in VB6.

But don't know where to begin, VB6 is too weak! :(

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...