Hi there!

I have the following problem: when calling this function
Qt Code:
  1. QAxWidget *dataq;
  2. // more code, i is the number of values to read
  3. QList<QVariant> res_array;
  4. for (int j=0; j<i; j++)
  5. res_array.append(0);
  6. dataq->dynamicCall("GetDataEx(int&, int)", res_array, i );
To copy to clipboard, switch view to plain text mode 

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