Our sister company wrote an ActiveX component for interfacing to a device that they(we) sell. I have developed a VS2008 C# interface to the OCX by placing their COM object on a windows form then communicating through the generated interop.
But this is not working when I try to run the application on Win7 64-bit. When I try to create the form which in turn loads the OCX, I get the following error:
COMException was caught. Class not registered (Exception from HRESULT:0x80040154 (REGDB_E_CLASSNOTREG))
The problem is not that the component is not registered. I can see that the OCX is properly registered in the registry. If I run their application it works fine with the registered OCX.
I am able to debug the OCX. I can see the constructor called on a 32-bit OS. But the constructor is never called on a 64-bit OS. There appears to be something wrong inside of the AxInterop.
I also tried regenerating the AxInterop in the development system running on a 64-bit OS. I deleted and readded the component from the form. But this did not change the problem.
I am now at a complete loss as to where to look next.
View Complete Post