all groups > dotnet academic > march 2004 >
You're in the

dotnet academic

group:

local area connection


local area connection Oren
3/22/2004 4:36:05 AM
dotnet academic:
Hi all

How can I notice that my local area connection is Unpluged ? I'm writing in C#. Do I need to add an event
What namespace and class do I need to use

Please add some code samples. I didn't find this question in this Newsgroup anywhere

Re: local area connection Mack D. Male [MVP]
3/22/2004 4:43:44 PM
Hi Oren,

I found this sample which checks to see if you have an active Internet
connection. It uses the wininet.dll function InternetGetConnectedState.

http://www.csharphelp.com/archives3/archive499.html

This thread also has some code samples for how to check for an Internet
connection through WMI (on Windows 2000 and XP), as well as with DllImports.

http://www.dotnet247.com/247reference/msgs/21/105555.aspx

As for responding to an "unplugged" event, I do not know if this is possible
(which is why I went looking) and I wasn't able to find anything either.
Your best bet would probably be to use one of the methods described in the
links above, and check at a set interval.

Regards,

Mack D. Male
MVP Visual Developer - Academic
http://www.mastermaq.net


[quoted text, click to view]
Hi all,

How can I notice that my local area connection is Unpluged ? I'm writing in
C#. Do I need to add an event ?
What namespace and class do I need to use ?

Please add some code samples. I didn't find this question in this Newsgroup
anywhere.

Thanks.

AddThis Social Bookmark Button