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:
Qt Code:
  1. QAxWidget* pAxWidget = new QAxWidget(...);
  2. pAxWidget->setControl( "..." );
To copy to clipboard, switch view to plain text mode 

queryInterface way:
Qt Code:
  1. CComPtr< ... > pComponent;
  2. pAxWidget->queryInterface( __uuidof(...), (void**)&pComponent );
  3. pComponent->doSomething();
To copy to clipboard, switch view to plain text mode 

dynamicCall/property/setProperty way:
Qt Code:
  1. pAxWidget->dynamicCall( "doSomething()" );
To copy to clipboard, switch view to plain text mode 


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

Thanks in advance.