Fog Creek Software
Discussion Board

Welcome! and rules

Joel on Software

detect when network cable is disconnected

How can I write a program to detect when my network connection fails (such as somebody disconnecting the cable)?  I don't want to have to poll network sites or any of that monkey business.  I just want a function triggered in my code when the network goes out.  There's gotta be a way to do it: win2k shows a little icon in the sys tray when you unplug your network cable.

Skeets Norquist
Monday, December 9, 2002  may help you a little. But the key is that yes, it's only win2k and above, and rather undocumented... my guess is that if you went seriously hardware deep, you could do it inless, but i don't think that's something you want to be doing!

Andrew Cherry
Monday, December 9, 2002 has some WMI code for this.

Mike Gunderloy
Monday, December 9, 2002

*  Recent Topics

*  Fog Creek Home