While reviewing some code, I found a snippet for checking internet connection, like this
I found this way of internet connection availablilty many times, but most of the times it was google.com :) So I thought of writing the correct way (at least from my prespective) of verifying internet connection. For this I am using a WIN32 API, InternetGetConnectedState method, from wininet.dll. And here is the snippet.
Happy Programming :)
Did you like this article? Share it with your friends