Click to See Complete Forum and Search --> : InternetGetConnected()


shah_shweta
June 1st, 2004, 09:43 AM
While compiling the below code , i am getting following error.
" error C2065: 'INTERNET_CONNECTION_CONFIGURED' : undeclared identifier Error executing cl.exe."

I have included WinInet.h in the file and linked Wininet.lib .
I have VC++ 6.0 with SP6


/*************/
DWORD lpdwFlags;
BOOL bRetVal;
bRetVal = InternetGetConnectedState(&lpdwFlags, 0);
if ( lpdwFlags & INTERNET_CONNECTION_CONFIGURED )
cout << "INTERNET_CONNECTION_CONFIGURED" << endl;
if ( lpdwFlags & INTERNET_CONNECTION_LAN )
cout << "INTERNET_CONNECTION_LAN " << endl;
if ( lpdwFlags & INTERNET_CONNECTION_MODEM )
cout << "INTERNET_CONNECTION_MODEM " << endl;
/* if ( lpdwFlags & INTERNET_CONNECTION_OFFLINE )
cout << "INTERNET_CONNECTION_OFFLINE " << endl;*/
if ( lpdwFlags & INTERNET_CONNECTION_PROXY )
cout << "INTERNET_CONNECTION_PROXY " << endl;

Bond
June 1st, 2004, 10:37 AM
What's version of the Platform SDK do you have? INTERNET_CONNECTION_CONFIGURED doesn't exist in the older WININET.H files.

shah_shweta
June 1st, 2004, 11:16 PM
yes you are right.I checked WinInet.h and it does not have this entry in it.
1. How do i know which version of SDK i am using ?
2.Which version Of SDk has this in it? I installed latest Internet development SDK ..but it was of no use.
3.In which SDK is WinInet implemented?
TIA

Mick
June 1st, 2004, 11:29 PM
Originally posted by shah_shweta
yes you are right.I checked WinInet.h and it does not have this entry in it.
1. How do i know which version of SDK i am using ?
2.Which version Of SDk has this in it? I installed latest Internet development SDK ..but it was of no use.
3.In which SDK is WinInet implemented?
TIA

The Platform SDK is what you need. After you install it, make sure the include/lib directories to the SDK are the first entries in yoru tools->Options->directories

http://www.microsoft.com/msdownload/platformsdk/sdkupdate/

full download:

http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm