Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Internet connection detect

4 views
Skip to first unread message

Darren Thomas

unread,
Oct 16, 2002, 1:14:59 PM10/16/02
to
Can anyone tell me how I can implement an internet connection watcher? or
get the state of an internet connection?

Many Thanks

Darren Thomas

Elan Zhou(MS)

unread,
Oct 18, 2002, 7:20:02 AM10/18/02
to
Hi,

You can check a previous post:
http://66.129.67.100/247reference/msgs/5/28316.aspx

Regards,
Elan Zhou
This posting is provided "AS IS" with no warranties, and confers no rights.
Got .Net? http://www.gotdotnet.com

Darren Thomas

unread,
Oct 20, 2002, 7:09:43 AM10/20/02
to
Thanks for the help, but do you have too have resort to an API call to get
the connection state? I would have thought that the .NET Framework would
have supported this?

Regards

Darren Thomas
MCP

"Darren Thomas" <qzr...@btinternet.com> wrote in message
news:aok6qj$p8n$1...@venus.btinternet.com...

VBDotNet Team [MS]

unread,
Oct 21, 2002, 4:24:47 PM10/21/02
to
You can check your machine's connection state by checking the local IP
address. Once you get the address you can see if the address is the
loopback address, if it is, then you aren't on your network. Here's the
code:

Dim ipaddr As IPAddress()
Dim ipHost As New IPHostEntry()

ipHost = Dns.GetHostByName(Dns.GetHostName())
ipaddr = ipHost.AddressList

Dim x As IPAddress
For Each x In ipaddr
Console.WriteLine("IP Address {0}", x.IsLoopback(x))
Next

-Todd, Alfredo, Craig, Kemp (MS)

--


This posting is provided "AS IS" with no warranties, and confers no rights.

"Darren Thomas" <qzr...@btinternet.com> wrote in message

news:aou2tn$lq6$1...@venus.btinternet.com...

0 new messages