0

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

"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. The C++ DLL containing this call was compiled using Visual Studio 2008 (32-bit) on a Windows XP Professional system.

Other than Outlook 2007, this is an otherwise clean install in a VM.

Thanks!

Chris White
  • 1,068
  • 6
  • 11
  • Are you running with elevated privileges as well as an administrative account? I believe that the HTTP daemon requires elevated privileges to execute. – GrayWizardx Dec 15 '09 at 17:50
  • I must admit I haven't the foggiest on that one. I just tested the DLL from a C++ command line test program with the same result (this is normally called from a C# user control). I'm a total neophyte in the Windows 7 area, so I sort of suspect it's a permissions issue of some kind. – Chris White Dec 15 '09 at 18:54
  • Installation on Vista (32-bit) does not result in the same behavior. Interesting... – Chris White Dec 15 '09 at 22:18

1 Answers1

1

It appears to have been a timing issue. I was calling WinHttpOpen in the DLL_PROCESS_ATTACH section of DllMain. Moving it from there seems to have resolved the issue.

Chris White
  • 1,068
  • 6
  • 11