It seems I am not the only one to have discovered this: http://forums.devx.com/showthread.php?t=72771
Actually both:
InternetGetConnectedState
InternetGetConnectedStateEx
are not reporting correctly. When I am connected, it returns 0x12 and when I an not connected it returns 0x10 (0x10 is not defined) http://msdn.microsoft.com/en-us/library/aa384705(VS.85).aspx
Anyone care to take a guess at the definition of 0x10 in WinXP SP3?
Having read on this forum some suggestions for testing for the presence of an internet connection (C/C++) like http://stackoverflow.com/questions/285860/how-can-i-programmatically-test-an-http-connection
I would write a WinHTTP function to return the headers of the servers main webpage, except the server I want to test a connection to, only runs CGI apps. I would prefer to not waste precious server memory and processor resources confirming thousands of clients connections.
any other suggestions?