Hello there
I am trying to get the internet status info with InternetGetConnectedState() but its not working. Take a look at my code...
Code:
#include <iostream>#include <wininet.h>
using namespace std;
int main()
{
BOOL result;
DWORD check;
result = InternetGetConnectedState(&check,0);
if(result)
{
cout<<"Internet status is : TRUE";
}
else
{
cout<<"No Internet Connection";
}
return 0;
}
When I am trying to compile and run its showing below error :
C:\[my_path]\main.o:main.cpp|| undefined reference to `InternetGetConnectedState@8'|
I am using codeblocks and GCC compiler.