惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

U
Unit 42
B
Blog
博客园 - Franky
H
Help Net Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
月光博客
月光博客
云风的 BLOG
云风的 BLOG
小众软件
小众软件
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 聂微东
G
Google Developers Blog
大猫的无限游戏
大猫的无限游戏
M
MIT News - Artificial intelligence
罗磊的独立博客
H
Hackread – Cybersecurity News, Data Breaches, AI and More
宝玉的分享
宝玉的分享
L
LangChain Blog
阮一峰的网络日志
阮一峰的网络日志
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Vercel News
Vercel News
V
V2EX
Martin Fowler
Martin Fowler
T
Tailwind CSS Blog
有赞技术团队
有赞技术团队

博客园 - Michael Lee

如何创建一个Edge 浏览器扩展 《微软互联网信息服务(IIS) 最佳实践》已上市,欢迎选购! 一个由Response.Redirect 引起的性能问题的分析 参观微软研发集团中关村新办公楼 通过模拟器看Windows Phone 7 70-660 Windows Internals 考试感言 WebKit 在Windows 平台下编译小结 微软考试再次降价 Windows PowerShell 2.0 Administrator's Pocket Consultant 书评 Android SDK 有bug 编译 Firefox 其实很简单 Self-Paced Training Kit (Exam 70-561): Microsoft® .NET Framework 3.5 ADO.NET Application Development 书评 微软MCPD for .NET 3.5 考试全攻略 TS:70-503 Windows Communication Foundation TS: 70-505 Windows Form Application Dev 考试感言 转帖 WebKit 的 Code Syle 70-562 TS: Microsoft .NET Framework 3.5, ASP.NET Application Development 考试感言 70-540 TS: Microsoft Windows Mobile 5.0 - Application Development 考试感言 70-565 Pro: Designing and Developing Enterprise Applications Using the Microsoft .NET Framework 3.5 考试感言 70-565 Pro: Designing and Developing Enterprise Applications Using the Microsoft .NET Framework 3.5 考试感言
WinInet 与 winHTTP 共同在代码文件中引用会引起编译错误
Michael Lee · 2009-08-27 · via 博客园 - Michael Lee

问题:

      WinInet 与 WinHTTP 同为Windows 平台下访问互联网的API组。WinInet 技术比较老,已经有十余年历史了,在某些方面并不完全胜任访问Internet的工作。于是后来有了winHTTP APIs。 或许是微软考虑到winHTTP技术可以全面替代WinInet访问,所以某些结构体、宏被winHTTP.h 文件进行了重定义。当一个代码文件(.cpp 或.inl) 同时包含WinInet.h 和 winHTTP.h 文件时,将引起编译错误。

解决:
     我制作了一个兼容版本的winHTTP.h 文件,可以与WinInet.h 文件共同被同一个代码文件所引用。使用时,将该文件拷贝到工程文件夹下,并加入工程,编译时自然会替代Window SDK 目录下的winHTTP.h 文件。这个文件编译时,不会产生错误和多余的警告。

下载地址