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.