Hi

I'm trying to make a Qt GUI Application communicationg with a program called Disto Online. The program provides an API. In the documentation it says: (www.elcovision.com/e_down_disto_online.html)

"The automatisation interface is made via the IDispatch interface. There a 2 object classes: The class Disto2 which is the application class and the class DistoMeasureProxy (Measure) which represents a measurement. There is also a type library Disto2.tlb. The type library is in the same folder where you installed DISTO online."

I have been able to communicate by using QAxBase::dynamicCall in the following way.

Qt Code:
  1. QAxObject *disto = new QAxObject("Disto2.Application");
  2. cout << disto->dynamicCall("DistoVersion");
To copy to clipboard, switch view to plain text mode 

The problem, however is that i need to access functions that returns datatypes unsupported by QVariant. So I have to use queryInterface() (as stated in the reference http://doc.qt.nokia.com/4.0/qaxbase.html).

My question is then ... how? I've been trying to figure this out for ages, but have not succeded in finding the answer.

This is what I'm thinking: It shoul be possible to use the type library file and from that create a object which I can somehow use. It souds like a simple task but I dont know how to include the tlb-file and how to create such a object?

Any feedback will be highly appreciated.