Reputation: 6014
I'm trying to run a VBScript script that uses a 7-year-old 3rd-party 32-bit COM component on Windows Server 2008 R2, with the command-line 32-bit script host, SysWOW64\cscript.exe. When I call CreateObject on the class, it appears to be successful, but the very first time I try to use a property or method (I've tried several different ones) on the object, it gives me the "catastrophic failure". I have identical results with SysWOW64\wscript.exe, except, of course, that my error message comes in a msgbox instead of the command-line window.
I think this has to do specifically with the 64-bit scripting hosts because of the following:
My Google searches for solutions to this problem have mostly turned up a lot of different problems that were solved by putting the COM component into a toolbar in Visual Studio. Obviously, that solution doesn't apply here.
My questions are:
Thanks in advance.
Upvotes: 3
Views: 3220
Reputation: 942080
Don't read anything in the error text. "Catastrophic failure" must be the worst named HRESULT code ever. The programmer used the E_UNEXPECTED error code, it is common in COM programming. It usually indicates "I can't make this work, but I don't know why". Which of course doesn't leave you with many options to figure out why.
It is unlikely that it is directly related to running on a 64-bit version of Windows. You are using the 32-bit scripting hosts, they do an excellent job of providing a 32-bit execution environment for COM servers. Much more likely is that there simply is something amiss with the install, some kind of missing component. The only good way to get to the bottom of this is by contacting the author or vendor of the COM server for support. If that's impractical, consider running this inside a virtual PC that boots an earlier version of Windows.
Upvotes: 3