Capturing network status change event

后端 未结 4 1575
故里飘歌
故里飘歌 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 19:59

    this Codeproject link gives detail on

    How to use the Windows NLM API to get notified of new network connectivity

    And maybe helpful to any challenge related to this one.

    An application often needs to know if the machine has internet connectivity and take actions depending on that. In this sample, we are looking at the usage of the Windows NLM API in managed code so that an application can choose to respond to internet connectivity changes. There are many other specific NLM APIs for checking domain connectivity, network adapter interfaces etc., that haven't been mentioned in this article; you can refer to this link for further details. The downloadable zip file has the source code.

    more reading here

    https://www.codeproject.com/Articles/34650/How-to-use-the-Windows-NLM-API-to-get-notified-of

提交回复
热议问题