How to call function from COM correctly in QT?I

204 Views Asked by At

I want to call a function from COM like this:

    long func(int count,Variant *buffer);

Programmers should allocate float array and deliver the pointer and length to function func.
What I do is like this:

    QAxobject myCom;
    float[1024] buffer;
    QVariant v=QVariantfromValue(buffer);
    myCom.setControl("{........}");
    myCom.dynamicCall("func(int,Variant*)",1024,v);

When exe runs, I find it not works as I assumed.Then how to call func correctly?

0

There are 0 best solutions below