ADO DOT NET
Well-known member
- Joined
- Dec 20, 2006
- Messages
- 156
Hi,
I use this .NET code to get the IP address of all my current DNS server:
It works great but in .NET, I need to do the same also in VB6.
But dont know where to begin, VB6 is too weak!
I use this .NET code to get the IP address of all my current DNS server:
Code:
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
But dont know where to begin, VB6 is too weak!