windows - WinInet 与 WinHttp(服务或类似服务的进程)

标签 windows visual-c++ wininet winhttp

我无法理解“服务或类服务过程”这两个概念之间的区别。

在 msdn WinHTTP vs. WinINet页面说:

When selecting between the two, you should use WinINet, unless you plan to run within a service or service-like process that requires impersonation and session isolation.

WinInet function 的 msdn 注释中说:

Note WinINet does not support server implementations. In addition, it should not be used from a service. For server implementations or services use Microsoft Windows HTTP Services (WinHTTP).

“需要模拟和 session 隔离的服务或类似服务的进程”是什么意思?
“WinINet不支持服务器实现”是指在Windows Server上运行?
如果我的应用程序使用 IIS 运行,我是否应该使用 WinHTTP 而不是 WinInet?

最佳答案

WinINet 专为面向人的应用程序而设计,在某些情况下,它会在用户屏幕上显示错误消息和连接弹出窗口。如果您从服务中使用它,或者没有人可以关闭弹出窗口,它将阻止您的应用程序。这就是为什么你不应该使用 WinINet,除非你确定用户坐在计算机前等待关闭“设置连接”对话框或错误消息。

If my application run with IIS Have I to use WinHTTP instead WinInet?

都没有。 IIS 有自己的 HTTP stack在内核模式下运行 HTTP.sys 驱动程序

关于windows - WinInet 与 WinHttp(服务或类似服务的进程),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11992523/

相关文章:

c++ - 关于 Windows 和 posix 中的 1 个刻度

visual-studio - 从命令行构建 VS2008 动态添加预处理器指令

c++ - 无法编译 C++ 代码,因为无法访问 ifstream

windows - 变量未按预期运行

c++ - 驱动器号上的 FindFiles 失败但通过路径

java - 如何确保HSQLDB属性配置在Windows上加载?

c++ - 运算符 TYPE () 并获取对象的地址

delphi - 下载前使用 WinInet 确定文件总大小

c++ - 使用 internetcheckconnection 在 C++ 中检查互联网连接

使用 Http Post 的 C Wininet 文件上传