Unsolved can't get int array data with dynamiccall() in AxBase class
-
Hi guys.
I'm making some program works getting datas form a s/w (mitsubishi plc software)It is the method I wanna control
"ReadDeviceBlock(String *szDevice, int iSize, int *iplData)".
So, I try to use it with DynamicCall() but it can't get inteager array data.
Exactly, It got int array data into somewhere and there is a "Heap block at 0X0C32B450 modified at 0X0C32B45C" message in application out.
I opened the memory editor and go to 0X0C32B45C. Inteager array datas what I want are stored in there.This is how I used dynamiccall().
void test()
{
QList<QVariant> qvl_Temp;
QList<QVariant> qvl_Data;
QVariant qv_Temp;
const QString sRDB = "ReadDeviceBlock(QString, int, int&)";qvl_Data << 0 << 0 << 0 << 0 << 0;
qvl_Temp << "D0" << 5 << qvl_Data;
// "D0" means start address where I want to get of plc (output s/w)
// 5 means how many
// << qvl_Data means to get memory space for getting data form the output s/wqv_Temp = object->dynamicCall(sRDB.toLatin1(), qvl_Temp);
}
It can get just one data into qvl_Temp.at(2), other datas are stored somewhere modified heap address.I tried all I knew.
qvl_Temp << "D0" << 5 << (QVariant)qvl_Data; // It doesnt work
sRDB = "ReadDeviceBlock(QString,int,QList<QVariant>&)" // some error about dispatch
QByteArray, QVector<int>, Q_DECLARE_METATYPE(int* or something)... everythingreally no way??