I have 3d party library. This library written like Com-object using VS2010. It provides a lot of classes and interfaces. I used dumpcpp util for creation .h and .cpp files. I can create classes of the library and invoke their functions. But some functions require interface classes for the arguments. I can create the interface classes using QaxBase::queryInterface method. But when I invoke the functions I have the error "QAxBase: Error calling IDispatch member Init: Non-optional parameter missing"
/*
Class1, IClass1, Class2, IClass2 from files generated with dumpcpp
*/
Class1* obj1 = new Class1();
int count = obj1->Count(); // working fine
IClass1* iObj1 = NULL;
obj1->queryInterface(IID_IUnknown, reinterpret_cast<void**>(&iObj1));//working fine
Class2* obj2 = new Class2();
obj2->Init(iObj1); //QAxBase: Error calling IDispatch member Init: Non-optional parameter missing
/*
Class1, IClass1, Class2, IClass2 from files generated with dumpcpp
*/
Class1* obj1 = new Class1();
int count = obj1->Count(); // working fine
IClass1* iObj1 = NULL;
obj1->queryInterface(IID_IUnknown, reinterpret_cast<void**>(&iObj1));//working fine
Class2* obj2 = new Class2();
obj2->Init(iObj1); //QAxBase: Error calling IDispatch member Init: Non-optional parameter missing
To copy to clipboard, switch view to plain text mode
I tried to do the same using VS2010 and WinApi only (without Qt), and it works.
How to make it work with Qt?
Bookmarks