0

I've recently changed from Winsock to WinHTTPRequest however when this line runs:

Set WinHttpReq = New WinHttpRequest

I receieve an Automation Error :2147024769.

This code works fine on windows7/Windows server 2008, however is failing in Windows 2003.

Is this a problem with the winhttp.dll not being found on Windows server 2003?

dan983
  • 454
  • 2
  • 5
  • 19
  • It is a "file not found" error code, can't find a DLL it needs. Use SysInternals' Process Monitor to find what DLL is missing. Fwiw, the download for winhttp5.dll was removed 11 years ago. – Hans Passant Feb 23 '15 at 13:41

1 Answers1

1

See Using WinHTTP as a Side-by-side Assembly if you need to use WinHttp 5.1 on Win2003 Server SP1 or later. A sample manifest can be found there but to make use of the information you'll need an understanding of manifest use in VB6 applications.

Bob77
  • 13,167
  • 1
  • 29
  • 37
  • Thank you very much, you helped me realize I made a error when generating the manifest files. I am running MMM(MakeMyManifest) on a Win7 machine and I never realized that Win2003's winhttp.dll is not in the same location. I've removed the dependency and it seems to work now. However is this the correct approach or poor practise? – dan983 Feb 23 '15 at 14:18
  • I'm not sure what you mean by "removed the dependency." The winhttp.dll is not deployable but part of the OS. So you should not try to isolate it using a tool like MMM. If you need to use the winhttp.dll assembly on Win2003 via MMM you should create a customized version that can include the assembly-selection node in manifests. No publicly released version of MMM does this. – Bob77 Feb 23 '15 at 15:34
  • MMM created a list of dependencies based on what my application was using and when I changed to WinHTTPRequest it included winHttp.dll with the location C:\Windows\System32\winhttp.dll. Not including this dependency has fixed the automation error I was getting. – dan983 Feb 23 '15 at 15:52
  • Ahh. Yes, there are many libraries you should not attempt to isolate and distribute. MMM has a list of the common ones to hard-exclude but it isn't all-encompassing so the developer still has to have some knowledge. Glad you got past the problem! – Bob77 Feb 23 '15 at 22:19