Capturing network status change event

后端 未结 4 1572
故里飘歌
故里飘歌 2021-01-20 19:50

I am trying to get events when the internet connection is reestablished after it is lost. It is for a data transfer software that I am developing. If I lose the network duri

4条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-20 20:23

    This MSDN link gives a very detailed example of how to capture events on WMI with COM. The example doesn't actually capture network events - but I believe that if you plug the right query in, it would work.

    (lots of code here, so I'm not copying it into the answer) http://msdn.microsoft.com/en-us/library/aa390425%28v=vs.85%29.aspx

提交回复
热议问题