是否有在 Windows 上的 C 中使用 winhttp 的完整示例?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3172266/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 14:45:19  来源:igfitidea点击:

Are there any complete examples of using winhttp in C on windows?

cwindowswinhttp

提问by jacortinas

I can find tons of examples in C++, but nothing that's written in just C. I am trying to connect to an http server, download the returned data, and then save it to a file. Is there a better way to do it on Windows? Should I not be using WinHttp or WinInet? Windows documentation for C seems to be extremely lacking on the internet. Thank you for your help.

我可以在 C++ 中找到大量示例,但没有任何仅用 C 编写的示例。我正在尝试连接到 http 服务器,下载返回的数据,然后将其保存到文件中。在 Windows 上有更好的方法吗?我不应该使用 WinHttp 或 WinInet 吗?互联网上似乎非常缺乏 C 的 Windows 文档。感谢您的帮助。