简体   繁体   English

WinHTTP和Windows 7 x64:错误

[英]WinHTTP and Windows 7 x64: Error

I have an application which uses WinHTTP, and it seems under Windows 7 (64-bit; have yet to test the 32-bit version) the call to WinHttpOpen fails, returning 我有一个使用WinHTTP的应用程序,看来在Windows 7(64位;尚未测试32位版本)下,对WinHttpOpen的调用失败,返回

"The group or resource is not in the correct state to perform the requested operation." “组或资源未处于执行请求的操作的正确状态。”

This corresponds to error code 5023, and occurs for the Administrator as well as a standard user. 这对应于错误代码5023,并且对于管理员和标准用户均会发生。 The C++ DLL containing this call was compiled using Visual Studio 2008 (32-bit) on a Windows XP Professional system. 包含此调用的C ++ DLL是使用Windows XP Professional系统上的Visual Studio 2008(32位)编译的。

Other than Outlook 2007, this is an otherwise clean install in a VM. 除Outlook 2007之外,这是在VM中进行的全新安装。

Thanks! 谢谢!

It appears to have been a timing issue. 这似乎是一个时间问题。 I was calling WinHttpOpen in the DLL_PROCESS_ATTACH section of DllMain. 我在DllMain的DLL_PROCESS_ATTACH部分中调用WinHttpOpen。 Moving it from there seems to have resolved the issue. 从那里移走它似乎已经解决了问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM