If wininet and WinHTTP are referenced together in the code file, compilation errors may occur.

Source: Internet
Author: User
Problem:

Wininet and WinHTTP are the same API groups that access the Internet on Windows platforms. Wininet technology is relatively old and has been around for more than a decade. It is not fully competent to access the Internet in some aspects. So later we had WinHTTP APIs. Microsoft may consider that the WinHTTP technology can fully replace wininet access, so some struct and macros are redefined by the WinHTTP. h file. WhenCodeWhen a file (. cpp or. INL) contains both the wininet. h and WinHTTP. H files, a compilation error occurs.

Solution:
I have created a compatible version of WinHTTP. H, which can be referenced by the same code file together with the wininet. h file. During use, copy the file to the project folder and add it to the project. during compilation, the WinHTTP. h file under the Windows SDK directory is replaced. This file will not generate errors or additional warnings during compilation.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.