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. Hi, Why I can't invoke an activex function (with an argument of type IDispatch*)correctly? [Solved]
Forum Updated to NodeBB v4.3 + New Features

Hi, Why I can't invoke an activex function (with an argument of type IDispatch*)correctly? [Solved]

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 2.7k Views 1 Watching
  • 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.
  • F Offline
    F Offline
    foxyz
    wrote on last edited by
    #1

    This is my code:
    @
    QAxWidget *m_tws = new QAxWidget(this);
    m_tws->setControl("MyActivex.Ctrl.1");
    m_tws->dynamicCall("connect(int)", 1); //All is oK till here

    QAxObject * contractInfo = m_tws->querySubObject("createContract()");
    
    if (contractInfo) {
        contractInfo->setProperty("conId", 7516);
        contractInfo->setProperty("symbol", QString("GE") );
        contractInfo->setProperty("secType",QString("STK") );
        ...
        
        QVariantList params;
        int tickerId = 1;
        params << tickerId;
        params << contractInfo->asVariant();
        params << "mdoff,100,101,104,105,106,107,165,221,225,233,236,258";
        params << 0;
        *m_tws->dynamicCall("reqMktDataEx(int, IDispatch*, QString, int)",  params);*
       //After this call, a signal should be emited by m_tws and sent me the market data. But I received nothing!
    

    @

    Buddy! give me a hand!

    [Mark up code, Tobias]

    I just know coding and coding

    1 Reply Last reply
    0
    • F Offline
      F Offline
      foxyz
      wrote on last edited by
      #2

      Everything is ok now!

      Just my fault!. The code is correct

      I just know coding and coding

      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