請問群益API在讀取憑證發生錯誤
以下程式跑到讀取憑證就有問題(System.AccessViolationException)但是單獨開策略王下單沒問題懇請是否有人知道答案...感謝
m_nCode = m_pSKOrder.SKOrderLib_Initialize();
SendReturnMessage("Order", m_nCode, "SKOrderLib_Initialize");
m_nCode = m_pSKOSQuote.SKOSQuoteLib_Initialize();
SendReturnMessage("OSQuote", m_nCode, "SKOSQuoteLib_Initialize");
m_pSKOrder.OnAccount += new _ISKOrderLibEvents_OnAccountEventHandler(m_OrderObj_OnAccount);
m_pSKOrder.OnAsyncOrder += new _ISKOrderLibEvents_OnAsyncOrderEventHandler(m_pSKOrder_OnAsyncOrder);
m_pSKOrder.OnRealBalanceReport += new _ISKOrderLibEvents_OnRealBalanceReportEventHandler(m_pSKOrder_OnRealBalanceReport);
m_pSKOrder.OnOpenInterest += new _ISKOrderLibEvents_OnOpenInterestEventHandler(m_pSKOrder_OnOpenInterest);
m_pSKOrder.OnOverseaFutureOpenInterest += new _ISKOrderLibEvents_OnOverseaFutureOpenInterestEventHandler(m_pSKOrder_OnOverseaFutureOpenInterest);
m_pSKOrder.OnStopLossReport += new _ISKOrderLibEvents_OnStopLossReportEventHandler(m_pSKOrder_OnStopLossReport);
m_pSKOrder.OnOverseaFuture += new _ISKOrderLibEvents_OnOverseaFutureEventHandler(m_pSKOrder_OnOverseaFuture);
m_pSKOrder.OnOverseaOption += new _ISKOrderLibEvents_OnOverseaOptionEventHandler(m_pSKOrder_OnOverseaOption);
m_pSKOrder.OnFutureRights += new _ISKOrderLibEvents_OnFutureRightsEventHandler(m_pSKOrder_OnFutureRights);
m_pSKOrder.OnRequestProfitReport += new _ISKOrderLibEvents_OnRequestProfitReportEventHandler(m_pSKOrder_OnRequestProfitReport);
m_pSKOrder.OnOverSeaFutureRight += new _ISKOrderLibEvents_OnOverSeaFutureRightEventHandler(m_pSKOrder_OnOverSeaFutureRight);
m_pSKOrder.OnMarginPurchaseAmountLimit += new _ISKOrderLibEvents_OnMarginPurchaseAmountLimitEventHandler(m_pSKOrder_OnMarginPurchaseAmountLimit);
m_pSKOrder.OnBalanceQuery += new _ISKOrderLibEvents_OnBalanceQueryEventHandler(m_pSKOrder_OnBalanceQueryReport);
m_nCode = m_pSKOSQuote.SKOSQuoteLib_EnterMonitor();
SendReturnMessage("OSQuote", m_nCode, "SKOSQuoteLib_EnterMonitor");
m_nCode = m_pSKOrder.ReadCertByID("A12XXXXXXX5");
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
發生 System.AccessViolationException
SendReturnMessage("Order", m_nCode, "ReadCertByID");
m_nCode = m_pSKOrder.GetUserAccount();
SendReturnMessage("Order", m_nCode, "GetUserAccount"); 不知道解決了嗎? 小弟也是在使用群益api..沒發現這問題
頁:
[1]