InternetQueryOption() & INTERNET_VERSION_INFO

Hi,

I'm trying to have a function that checks to see what version of Explorer the PC is running.

INTERNET_VERSION_INFO structVI;
      DWORD dwStructSize = sizeof(INTERNET_VERSION_INFO);
      InternetQueryOption(NULL,INTERNET_OPTION_VERSION, (LPVOID) &structVI, &dwStructSize);
      CString minorVersion = structVI.dwMinorVersion;
      if(minorVersion >= 1)
            return true;
      else
            return false;

I get this error:
SmartClassMenuView.obj : error LNK2001: unresolved external symbol __imp__InternetQueryOptionA@16
k:\out\out\03\exec\Debug/SmartClass.exe : fatal error LNK1120: 1 unresolved externals

I've include the right header file which is "Wininet.h".

If you read the documentation in MSDN for InternetQueryOption it also talks about a "WinInet.lib" Is that is what is missing and if so where do I include that or find that library

Thank you
Caro0101Asked:
Who is Participating?
 
ZizzerConnect With a Mentor Commented:
All you need to do is add Wininet.lib to your project's link options.  Assuming you are using VC++:

1. Click on Settings under the Project menu.

2. Click on the Link tab in the Project Settings dialog.

3. In the "Settings For" combo box on the left, choose "All Configurations"

4. Add Wininet.lib to the list of libraries in the "Object/library modules" field.

5. Recompile.

-- Zizzer
0
All Courses

From novice to tech pro — start learning today.