Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. can't get int array data with dynamiccall() in AxBase class
Qt 6.12 LTS is out! See what's new in the release blog

can't get int array data with dynamiccall() in AxBase class

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 853 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    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/w

    qv_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)... everything

    really no way??

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt
    • Unsolved