tom0485

17th May 2010, 10:30

Hi there!

I have the following problem: when calling this function

QAxWidget *dataq;

// more code, i is the number of values to read

QList<QVariant> res_array;

for (int j=0; j<i; j++)

res_array.append(0);

dataq->dynamicCall("GetDataEx(int&, int)", res_array, i );

it crashes with the following error:

Heap block at 0980F7A0 modified at 0980F7AA past requested size of 2

Looks like I have not allocated the memory correctly but how could I do it otherwise?

Cheers, Tom

I have the following problem: when calling this function

QAxWidget *dataq;

// more code, i is the number of values to read

QList<QVariant> res_array;

for (int j=0; j<i; j++)

res_array.append(0);

dataq->dynamicCall("GetDataEx(int&, int)", res_array, i );

it crashes with the following error:

Heap block at 0980F7A0 modified at 0980F7AA past requested size of 2

Looks like I have not allocated the memory correctly but how could I do it otherwise?

Cheers, Tom