I have just realised something:
If my ip is
a.b.c.d
and my computer is connected to the internet from an internal home
network, then the dns will always be
192.168.0.1 if network connection sharing is used
and
a.b.c.1 if real addresses are used.
Would that be the case (most of the time) ?
p.s.
thanks for your code, it works, I got a few blank message boxes
and 192.168.0.1. The only strange one was 255.255.255.255 ,
i think this one is irrelevant for tcp/ip, isn't it?
"Terry Olsen" <to******@hotma il.com> wrote in message
news:ep******** ******@TK2MSFTN GP14.phx.gbl...
This works...
Dim objs As Object
Dim obj As Object
Dim WMI As Object
WMI = GetObject("WinM gmts:")
objs = WMI.InstancesOf ("Win32_Network AdapterConfigur ation")
For Each obj In objs
MsgBox(obj.DHCP Server.ToString )
Next
End Sub
To see all the different things you can do, look at this link...
http://www.activexperts.com/activmon...rConfiguration
"vbsearch" <dfgfdg> wrote in message
news:ut******** ******@TK2MSFTN GP10.phx.gbl... When I do something like this
For Each ip As System.Net.IPAd dress _
In System.Net.Dns. GetHostByName(s trDomain).Addre ssList
MessageBox.Show (ip.ToString)
Next ip
would it be correct to assume that GetHostByName uses my local DNS
server to perform the translation. If so, is there a way to extract the
i.p.(or host name/address ) of this server, as I need to query it
directly.
Tia.