I need a mind reading because I'm trying to do what I don't understand.
There is a 32-bit application (CQG electronic trading application) that provides the COM API for external access. I have examples of programs and scripts that access this API from Excel, .NET (C ++, VB and C #) and the VBScript shell. I have these .NET applications as source code and as compiled executables (32-bit compiled in Windows XP).
Now I have a 64-bit Windows Vista Home that makes my head spin. Excel examples work very well (in Excel 2003). Compiled .NET sample executables also work.
But when I try to run a .NET C # sample, converted and compiled by Visual Studio C # Expression, or run a VBScript script, I get error 80004005 when trying to create an object. Initially, the .NET application also gave me 80040154, but then I figured out how to get it to produce 32-bit code, not 64-bit, so now the errors in C # and VBScript applications are the same. That is all I got now.
And yes, I tried to run 32-bit versions of cscript.exe / WScript from the SysWOW64 folder on my VBS, but the result is still the same (80004005).
How to solve this problem? I am almost ready to believe that this is almost impossible, but the fact that Excel VBA works and the .NET executables compiled in Windows XP are just fine, it just makes me angry. There must be a way to defeat this (some kind of secret that only Windows Vista developers probably know)! I will appreciate any help!
PS: I believe that the code examples here do not make much sense, but this is a VBScript line that fails:
Set CEL = WScript.CreateObject("CQG.CQGCEL.4.0", "CEL_")
And this is C #:
CQGCEL CEL = new CQGCEL();
Update: Forgot to say UAC is off, of course. And I work with an account with administrator rights.
I also tried to see which registry keys are read using Process Monitor, but everything looks fine for the GUID of this object. I could not recognize the other GUIDs, so I'm not sure if they were critical or not.
Is it likely that this COM object is using Internet Explorer and receiving the wrong one (for example, Internet Explorer 7 instead of the Internet Explorer 6 engine or something like that)?