I need to detect when the Windows system is connected to/disconnected from network (LAN or WLAN) in C++ and without using WMI.
I have found a way to do this for wireless networks. (I have answered my own question here after finding a way), but this does not work (obviously) when I connect/disconnect a LAN cable.
How can I detect a change in network connection when user has connected a LAN cable to his Windows system? Is there a general way (instead of having separate code for WLAN and LAN) to find this?
Note: The network may or may not be connected to the internet.