发布于 2017年05月10日
作者:simon
到底该用哪个接口,微软这么说,api方式:功能齐全,不过调用复杂些;com接口,调用简单,属于一个封装,有部分功能缺失。https://msdn.microsoft.com/zh-cn/library/aa383158(v=vs.85).aspx
|
C/C++ API |
COM interface |
| Advantages |
- Responses can be processed in chunks, which is more efficient.
- POST operations can also be processed in chunks, speeding processing time.
- AutoProxy support.
- Access to the full feature set of WinHTTP.
- Binary data can easily be handled.
|
- Creating an application is easy and requires fewer lines of code than the C/C++ API.
- The interface can be used by scripting languages.
|
| Disadvantages |
- Processing is more complex.
- The C/C++ API requires more steps than the COM interface to perform the same actions.
- Setting up a request takes more code.
|
- The COM interface does not provide access to the full feature set of WinHTTP.
- It is difficult to handle binary data types in some scripting languages, such as VBScript and JScript.
- The COM interface does not support AutoProxy.
- Applications must use the COM APARTMENT_THREADED model.
- Before a response can begin being processed, the entire response must first be received and buffered.
|
看了此文的人貌似还看了这些:
∵RESTful API 最佳实践(转) 2018-10-10
∵NLPIR/ICTCLAS2014中科院分词系统Api接口 For 易语言 2014-04-09
∴linux系统禁ping及改ssh端口 2017-10-25
∴VBA宏命令:批量检索替换/修改word中指定多个关键词的格式内容等 2015-04-11
∴Centos安装Cisco IPSec V-P-N方式 2015-02-25
∴LNMP及LANMP环境一键搭建教程 2013-08-25
∴windows多进程间数据通信:内存映射 2015-05-19
∴lnmp下mysql 5.6内存占用过高解决方法 2015-11-02
∴易语言curl支持库与WinHttpRequest、WinInet、互联网支持库http访问对比测试 2014-04-30
∴win10系统开机很慢,提示等候”Profsvc”或”User Profile Service” 2025-10-13