PDA

View Full Version : ActiveQt : requested control could not be instantiated



zirconius
8th April 2010, 12:33
Hello,

I am running into a problem when trying to use an ActiveX controller (.ocx) in Qt. In short, I write that


m_activeX = new QAxWidget( this );
m_activeX->setControl("{3CE35BF3-1E13-4D2C-8C0B-DEF6314420B3}");

where {3CE35BF3-1E13-4D2C-8C0B-DEF6314420B3} is the CLSID of well-registered OCX component, I get the following error message:


CoCreateInstance failure (Class not registered)
QAxBase::setControl: requested control {3CE35BF3-1E13-4D2C-8C0B-DEF6314420B3} co
uld not be instantiated

My problem is simple: when developing a simple MFC application and embedding the very same ActiveX control in it, it works perfectly fine. Also, I tried to use testcon (provided by ActiveQt) on this ActiveX, but I got the same error message. So, is there some kind of incompatibility between this ActiveX and Qt4?

Note that surprisingly the ActiveX's CLSID does not show up in HKEY_CLASSES_ROOT\CLSID, but rather in HKEY_CLASSES_ROOT\Wow6432Node\CLSID. Can it be the cause for the problem?

zirconius
8th April 2010, 13:52
I shall add that my Qt program is compiled in 64 bit mode whereas the ActiveX control is a 32 bit one. I guess this explains the problem :P

arnobouwens
9th April 2010, 13:27
Hi,

I'm facing the same issue, so I was just wondering whether there's any clarification:
can a 64 bit qt application use a 32 bit activex control?

Cheers,
Arno