Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QAxObject and dynamicCall
QtWS25 Last Chance

QAxObject and dynamicCall

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 9.4k 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.
  • P Offline
    P Offline
    paulanon
    wrote on last edited by
    #1

    I'm trying to read a proprietary file through the vendor's COM file (dll). I am using QAxObject to open the file, but do not know if I'm calling these functions properly:
    @
    long GetVersionNumber(long FAR* pnVersion)
    long GetFileName(BSTR FAR* pbstrFileName)
    long GetInstSoftwareVersion(BSTR FAR* pbstrInstSoftwareVersion)
    long Open(LPCTSTR szFileName)
    long Close()
    @
    So, far the following seems to work (no crashes or errors), except the 2nd dynamicCall():

    @ int n = 0;
    QString qs = "blank";
    QAxObject* ptr = new QAxObject( "MSFileReader.XRawfile", 0 );
    n = ptr->dynamicCall("Open(const QString&)","C:\some.raw").toInt();
    n = ptr->dynamicCall("GetInstSoftwareVersion(QString &)", qs).toInt(); //qs is still "blank"
    n = ptr->dynamicCall("Close()").toInt();
    delete ptr;
    @
    Help appreciated.

    1 Reply Last reply
    0
    • P Offline
      P Offline
      paulanon
      wrote on last edited by
      #2

      Well, answering myself, but the making a html from generateDocumentation().toStdString() was useful.

      It works partially. I can call functions, but can't get results back from them.
      I can get results back from int&, but can't get any values back from QString&. I've also used both flavors of dynamicCall().

      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 Extensions
      • Unsolved