Hi, Why I can't invoke an activex function (with an argument of type IDispatch*)correctly? [Solved]
-
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 hereQAxObject * 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]