winapi - How to get the plugged/unplugged cable state -


I know about the IsNetworkAlive function from the Windows API but IsNetworkAlive false until any network activity does not

That is, if you start your computer and check connectivity it will be wrong. If you ping any other computer (or receive a ping or any network activity from a computer), then this will start to return true.

Is there any alternative or do anyone have to get an alternative solution for this?

Whatever I have tried to do:

  • Ping to the local host (none, because there really is no network activity)
  • Ping local
  • Note: I know that there is another question similar to this one, but here is my problem with IsNetworkAlive behavior

WinInet functions must satisfy your needs InternetGet ConnectedState function of particular interest Shan is there.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -