Discussion:
"Automation error, Error in the DLL"
(too old to reply)
Brent McLaren
2003-11-19 00:15:15 UTC
Permalink
Hi,

I am receiving this error message ("Automation error, Error in the
DLL") when I try to instantiate a WinHttpRequest object, using WinHTTP
5.0, as below:

Private HttpReq As WinHttp.WinHttpRequest
Set HttpReq = CreateObject("WinHttp.WinHttpRequest.5")

This declaration is inside a Class module. I do not seem to get the
same error if it is in a form. Also, I have never experienced the
error when the project is compiled and run as an .exe. It only
happens when I am running the program in the IDE. On one PC, if i
close the project and re-open it, the error does not occur until after
several runs of the program. However, on other PCs, I have never been
able to successfully run the program in the IDE. The whole thing
seems very odd!

Does anyone know what might be causing this error and how I can
correct it? Any suggestions would be greatly appreciated!

Thanks,
Brent


BACKGROUND INFO:
----------------
Visual Basic 6
Windows 2000 SP2
IE 5.5
WINHTTP5.dll is installed and registered
Stephen Sulzer
2003-11-19 02:13:37 UTC
Permalink
Hello Brent,

The "Error in the DLL" is a bug in WinHTTP 5.0 that sometimes causes the
WINHTTP5.DLL to fail to load. (The DLL raises an exception while loading.)

This bug was fixed in WinHTTP 5.1, which is available with Windows 2000
SP3/SP4, Windows XP SP1 and Windows Server 2003.

I do not believe a fix is available for WinHTTP 5.0, but I am not certain
about this. The latest set of patches for WinHTTP 5.0 is the "Rollup2
Hotfix", which can be obtained from Microsoft PSS. See KB article 813793-
http://support.microsoft.com/default.aspx?scid=kb;en-us;813793.

If the Rollup2 Hotfix does not fix the problem, and you cannot migrate to
WinHTTP 5.1, then you'll need to escalate a hotfix request with Microsoft
PSS.

The only workaround I can suggest is to try to load the WinHTTP5.DLL into
your process as early as possible, before other components are loaded. If
you are using WinHTTP5 in a VB project that uses many other components or
classes, then try creating a dummy global WinHttpRequest object during your
program's initialization before you instantiate any other components.


Stephen
Post by Brent McLaren
Hi,
I am receiving this error message ("Automation error, Error in the
DLL") when I try to instantiate a WinHttpRequest object, using WinHTTP
Private HttpReq As WinHttp.WinHttpRequest
Set HttpReq = CreateObject("WinHttp.WinHttpRequest.5")
This declaration is inside a Class module. I do not seem to get the
same error if it is in a form. Also, I have never experienced the
error when the project is compiled and run as an .exe. It only
happens when I am running the program in the IDE. On one PC, if i
close the project and re-open it, the error does not occur until after
several runs of the program. However, on other PCs, I have never been
able to successfully run the program in the IDE. The whole thing
seems very odd!
Does anyone know what might be causing this error and how I can
correct it? Any suggestions would be greatly appreciated!
Thanks,
Brent
----------------
Visual Basic 6
Windows 2000 SP2
IE 5.5
WINHTTP5.dll is installed and registered
Loading...