<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[can&#x27;t get int array data with dynamiccall() in AxBase class]]></title><description><![CDATA[<p dir="auto">Hi guys.<br />
I'm making some program works getting datas form a s/w (mitsubishi plc software)</p>
<p dir="auto">It is the method I wanna control<br />
"ReadDeviceBlock(String *szDevice, int iSize, int *iplData)".<br />
So, I try to use it with DynamicCall() but it can't get inteager array data.<br />
Exactly, It got int array data into somewhere and there is a "Heap block at 0X0C32B450 modified at 0X0C32B45C" message in application out.<br />
I opened the memory editor and go to 0X0C32B45C. Inteager array datas what I want are stored in there.</p>
<p dir="auto">This is how I used dynamiccall().</p>
<p dir="auto">void test()<br />
{<br />
QList&lt;QVariant&gt; qvl_Temp;<br />
QList&lt;QVariant&gt; qvl_Data;<br />
QVariant qv_Temp;<br />
const QString sRDB = "ReadDeviceBlock(QString, int, int&amp;)";</p>
<p dir="auto">qvl_Data &lt;&lt; 0 &lt;&lt; 0 &lt;&lt; 0 &lt;&lt; 0 &lt;&lt; 0;<br />
qvl_Temp &lt;&lt; "D0" &lt;&lt; 5 &lt;&lt; qvl_Data;<br />
// "D0" means start address where I want to get of plc (output s/w)<br />
//   5 means how many<br />
// &lt;&lt; qvl_Data means to get memory space for getting data form the output s/w</p>
<p dir="auto">qv_Temp = object-&gt;dynamicCall(sRDB.toLatin1(), qvl_Temp);<br />
}<br />
It can get just one data into qvl_Temp.at(2), other datas are stored somewhere modified heap address.</p>
<p dir="auto">I tried all I knew.<br />
qvl_Temp &lt;&lt; "D0" &lt;&lt; 5 &lt;&lt; (QVariant)qvl_Data; // It doesnt work<br />
sRDB = "ReadDeviceBlock(QString,int,QList&lt;QVariant&gt;&amp;)" // some error about dispatch<br />
QByteArray, QVector&lt;int&gt;, Q_DECLARE_METATYPE(int* or something)... everything</p>
<p dir="auto">really no way??</p>
]]></description><link>https://forum.qt.io/topic/60104/can-t-get-int-array-data-with-dynamiccall-in-axbase-class</link><generator>RSS for Node</generator><lastBuildDate>Tue, 27 Oct 2026 19:56:22 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/60104.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 28 Oct 2015 01:28:50 GMT</pubDate><ttl>60</ttl></channel></rss>