如何在QT?I中正确地从COM调用函数
我想从COM调用一个函数,如下所示:如何在QT?I中正确地从COM调用函数,qt,qaxobject,Qt,Qaxobject,我想从COM调用一个函数,如下所示: long func(int count,Variant *buffer); QAxobject myCom; float[1024] buffer; QVariant v=QVariantfromValue(buffer); myCom.setControl("{........}"); myCom.dynamicCall("func(int,Variant*)",1024,v); 程序员应分配浮点数组,并
long func(int count,Variant *buffer);
QAxobject myCom;
float[1024] buffer;
QVariant v=QVariantfromValue(buffer);
myCom.setControl("{........}");
myCom.dynamicCall("func(int,Variant*)",1024,v);
程序员应分配浮点数组,并将指针和长度传递给func函数。我是这样做的:
long func(int count,Variant *buffer);
QAxobject myCom;
float[1024] buffer;
QVariant v=QVariantfromValue(buffer);
myCom.setControl("{........}");
myCom.dynamicCall("func(int,Variant*)",1024,v);
当exe运行时,我发现它不像我想象的那样工作。那么如何正确调用func呢