|
-
Apr 8th, 2004, 05:33 AM
#1
Thread Starter
Addicted Member
Very Urgent
Is there any API in .Net to find whether the network cable is plugged / Unplugged?
Thanks in advance.
-
Apr 19th, 2004, 02:23 PM
#2
Frenzied Member
no there isnt,
you can use WMI to retrieve the IP address, if it fails that means the cable is not plugged in.
-
Apr 20th, 2004, 01:39 PM
#3
Fanatic Member
Hi Kovan,
I am really battling with this! Could you send me a code example please?
Much appreciated.
-
Apr 20th, 2004, 02:56 PM
#4
Frenzied Member
read this, good info
http://www.developersdex.com/asp/mes...2Ephx%2Egbl%3E
this should work, but its dirty and it requires WMI calls (which are slow most of the times, and the documentation is very very poor for WMI)
I will try to dig up how i implemented this, but i think mine was dirtier than anything, from what i vaguely remember, i would check IP address of a network connection, if it failed(threw exception) it was because network cable was not plugged, and if it was plugged it would either return nothing or the actual IP
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|