Network disconnect
-
Hello, I am looking for a way to capture network disconnection without sampling connection status every couple of minutes . I am trying to do some function when network is back connected.
-
Hello, I am looking for a way to capture network disconnection without sampling connection status every couple of minutes . I am trying to do some function when network is back connected.
Without knowing which version of Windows you are targetting, we can't really give you a definitive answer as network connectivity monitoring was enhanced post XP. A good starter, though, is this[^] article. Pay attention to the comments which link out to the Code Pack - this includes networking samples you can modify as you see fit.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
-
Without knowing which version of Windows you are targetting, we can't really give you a definitive answer as network connectivity monitoring was enhanced post XP. A good starter, though, is this[^] article. Pay attention to the comments which link out to the Code Pack - this includes networking samples you can modify as you see fit.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
Hi, First of all i have Win7 secondly, I found there is an event- NetworkChange.NetworkAvailabilityChanged which is in NetworkInformation namespace . This event raised when network connection status is changed . Is it a good way to use this?
-
Hi, First of all i have Win7 secondly, I found there is an event- NetworkChange.NetworkAvailabilityChanged which is in NetworkInformation namespace . This event raised when network connection status is changed . Is it a good way to use this?
It's one way to do it, but I have found under certain circumstances that it's not 100% reliable (for instance, I know of people who have found it not to work with static IP addresses when detecting reconnects).
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
-
Hello, I am looking for a way to capture network disconnection without sampling connection status every couple of minutes . I am trying to do some function when network is back connected.
Have a look at this http://blog.superuser.com/2011/05/16/windows-7-network-awareness/[^] Explains how MS does it, and how you can set up your own server to check. Good luck :)
Computers have been intelligent for a long time now. It just so happens that the program writers are about as effective as a room full of monkeys trying to crank out a copy of Hamlet.