Is there anyway with Windows api to detect whether a Windows 7 computer's network connection is an internet connection or a LAN connection without internet access? Windows 7 and Vista indicate this in the network icon (Local only v. Local and Internet), is there anyway to grab that information progammatically?
http://msdn.microsoft.com/en-us/library/aa370750(VS.85).aspx describes the difference between IsConnected
and IsConnectedToInternet
. Windows 7 only. I don't have a native code sample handy, sorry.
Pinging 4.2.2.2
is a common means of determining if internet connectivity is present.
The story behind this lies here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With