#include <stdio.h>
#include <windows.h>
#include <wininet.h>
#if defined (_MSC_VER)
#pragma comment (lib, "wininet.lib")
#endif
int main(void)
{
DWORD err;
if (InternetCheckConnection(L"http:// www.collectivesolver.com", FLAG_ICC_FORCE_CONNECTION, 0))
{
printf("This computer connected to the internet\n");
}
else
{
err = GetLastError();
if (err == ERROR_NOT_CONNECTED)
printf ("This computer NOT connected to the internet\n");
else
printf ("err %d\n", err);
}
return 0;
}