private void InitCallbacks()
 {
     //由于回调函数可能被GC回收,所以用成员变量将回调函数保存下来
     _fnOnConnect_Holder = OnConnect;
     _fnOnDisconnect_Holder = OnDisconnect;
     _fnOnMarketData_Holder = OnMarketData;
     //_fnOnErrRtnOrderAction_Holder = OnErrRtnOrderAction;
     //_fnOnErrRtnOrderInsert_Holder = OnErrRtnOrderInsert;
     _fnOnRspArbitrageInstrument_Holder = OnRspArbitrageInstrument;
     _fnOnRspError_Holder = OnRspError;
     _fnOnRspCancelOrder_Holder = OnRspCancelOrder;
     _fnOnRspInsertOrder_Holder = OnRspInsertOrder;
     _fnOnRspQryExchangeInstrument_Holder = OnRspQryExchangeInstrument;
     //_fnOnRspQryDepthMarketData_Holder = OnRspQryDepthMarketData;
     //_fnOnRspQryInstrument_Holder = OnRspQryInstrument;
     //_fnOnRspQryInstrumentCommissionRate_Holder = OnRspQryInstrumentCommissionRate;
     //_fnOnRspQryInstrumentMarginRate_Holder = OnRspQryInstrumentMarginRate;
     //_fnOnRspQryInvestorPosition_Holder = OnRspQryInvestorPosition;
     //_fnOnRspQryTradingAccount_Holder = OnRspQryTradingAccount;
     _fnOnRtnCancelOrder_Holder = OnRtnCancelOrder;
     _fnOnRtnExchangeStatus_Holder = OnRtnExchangeStatus;
     //_fnOnRtnDepthMarketData_Holder = OnRtnDepthMarketData;
     _fnOnRtnMatchedInfo_Holder = OnRtnMatchedInfo;
     _fnOnRtnOrder_Holder = OnRtnOrder;
     //_fnOnRtnTrade_Holder = OnRtnTrade;
     _fnOnRspQuoteSubscribe_Holder = OnRspQuoteSubscribe;
     _fnOnRtnQuoteSubscribe_Holder = OnRtnQuoteSubscribe;
 }
Example #2
0
 private void InitCallbacks()
 {
     //由于回调函数可能被GC回收,所以用成员变量将回调函数保存下来
     _fnOnConnect_Holder    = OnConnect;
     _fnOnDisconnect_Holder = OnDisconnect;
     _fnOnMarketData_Holder = OnMarketData;
     //_fnOnErrRtnOrderAction_Holder = OnErrRtnOrderAction;
     //_fnOnErrRtnOrderInsert_Holder = OnErrRtnOrderInsert;
     _fnOnRspArbitrageInstrument_Holder = OnRspArbitrageInstrument;
     _fnOnRspError_Holder                 = OnRspError;
     _fnOnRspCancelOrder_Holder           = OnRspCancelOrder;
     _fnOnRspInsertOrder_Holder           = OnRspInsertOrder;
     _fnOnRspQryExchangeInstrument_Holder = OnRspQryExchangeInstrument;
     //_fnOnRspQryDepthMarketData_Holder = OnRspQryDepthMarketData;
     //_fnOnRspQryInstrument_Holder = OnRspQryInstrument;
     //_fnOnRspQryInstrumentCommissionRate_Holder = OnRspQryInstrumentCommissionRate;
     //_fnOnRspQryInstrumentMarginRate_Holder = OnRspQryInstrumentMarginRate;
     //_fnOnRspQryInvestorPosition_Holder = OnRspQryInvestorPosition;
     //_fnOnRspQryTradingAccount_Holder = OnRspQryTradingAccount;
     _fnOnRtnCancelOrder_Holder      = OnRtnCancelOrder;
     _fnOnRtnInstrumentStatus_Holder = OnRtnInstrumentStatus;
     //_fnOnRtnDepthMarketData_Holder = OnRtnDepthMarketData;
     _fnOnRtnMatchedInfo_Holder = OnRtnMatchedInfo;
     _fnOnRtnOrder_Holder       = OnRtnOrder;
     //_fnOnRtnTrade_Holder = OnRtnTrade;
     _fnOnRspQuoteSubscribe_Holder = OnRspQuoteSubscribe;
     _fnOnRtnQuoteSubscribe_Holder = OnRtnQuoteSubscribe;
 }
Example #3
0
 public static extern void XSpeed_RegOnRspQryExchangeInstrument(IntPtr pMsgQueue, fnOnRspQryExchangeInstrument pCallback);