1

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?

BenMorel
  • 34,448
  • 50
  • 182
  • 322
huaxz1986
  • 135
  • 1
  • 1
  • 6

0 Answers0