PDA

View Full Version : Get the iDispatch interface of an ActiveX control



punkypogo
13th August 2010, 13:37
Hello,

I'm quite lost with this. I have an ActiveX component in my Qt application which displays some graphs (IoComp for instance).
I need to display digital levels of images from a video sequence (@25fps, gray color 16bps), so that means a lot of calls to my ActiveX component : communication through iDispatch interface is obsolutly mandatory.

So I am wondering if I need to call my component's function with dynamicCall() and/or property()/setProperty()? Or can I do it with queryInterface()?


Some code:

The base:

QAxWidget* pAxWidget = new QAxWidget(...);
pAxWidget->setControl( "..." );


queryInterface way:

CComPtr< ... > pComponent;
pAxWidget->queryInterface( __uuidof(...), (void**)&pComponent );
pComponent->doSomething();

dynamicCall/property/setProperty way:

pAxWidget->dynamicCall( "doSomething()" );


Which way is good to use the iDispatch interface of the ActiveX component?

Thanks in advance.

punkypogo
17th August 2010, 08:00
Up please!