How to check network connection type using Windows API?
How can I programmatically get the current connection type (like LAN or direct connection)?
InternetGetConnectedState () is not very reliable.
For example, I am connected to a wireless network, but ConTypeRet is 18, which is INTERNET_CONNECTION_LAN and INTERNET_RAS_INSTALLED. Isn't there a way to make sure ConTypeRet is either INTERNET_CONNECTION_LAN or INTERNET_CONNECTION_MODEM?
+2
source to share