InternetQueryOption() & INTERNET_VERSION_INFO


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

      DWORD dwStructSize = sizeof(INTERNET_VERSION_INFO);
      InternetQueryOption(NULL,INTERNET_OPTION_VERSION, (LPVOID) &structVI, &dwStructSize);
      CString minorVersion = structVI.dwMinorVersion;
      if(minorVersion >= 1)
            return true;
            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
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.