I'm programming a Windows local service using C++ and WinAPIs. From within that service I need to know that an Internet connection is available (in general) so I came up with the InternetGetConnectedState
API but then after reading the MSDN I found this in the Remarks section:
In addition, it should not be used from a service.
Well, "thank you", Microsoft!
Does anyone have any idea why and what alternative can I use from a service.
PS. I don't want to use the ping approach because obviously there's no way of knowing that the site I'm pinging is up, so it then opens up a whole new can of worms.