I want to use the wininet function InternetCheckConnection to check whenever the machine is connected to the internet and can access a specific host. The problem is that this function is always returning false, no matter the URL I put on it.
A:
Just a wild guess, but perhaps this is due to a personal firewall blocking all outgoing connections for one of the Windows DLLs and / or your application?
Adrian Grigore
2009-02-18 12:06:49
I don't have a firewall configured on my machine. All protocols and ports can be accessed freely. :)
gmuller
2009-02-18 12:31:34
Well, as I said, it was just a wild guess :-)
Adrian Grigore
2009-02-18 18:29:14
A:
Have you checked GetLastError()
? If I read MSDN correctly, you would need to check for ERROR_NOT_CONNECTED
to determine whether you're truly offline.
MSalters
2009-02-18 13:03:05