//交易账号登陆 public WindData tlogon(string brokerID, string departmentID, string accountID, string password, string accountType, string options = "", TradeCallback callback = null) { checkConnection(); object ofields, odata; int errCode; if (callback != null) { options += ";PushCallBack=A"; lock (TradeCallbackList) { TradeCallbackList[0] = callback; } } odata = wdc.tLogon(brokerID, departmentID, accountID, password, accountType, options, out ofields, out errCode); WindData retData = formatWD(null, ofields, null, odata, errCode); if (callback != null && retData.errorCode == 0) { lock (TradeCallbackList) { TradeCallbackList.Remove(0); string strLongId = retData.GetLogonId(); ulong LogonID = 0; if ((!string.IsNullOrEmpty(strLongId)) && (LogonID = Convert.ToUInt32(strLongId)) != 0) { TradeCallbackList[LogonID] = callback; } } } return(retData); }
//交易账号登陆 public WindData tlogon(string brokerID, string departmentID, string accountID, string password, string accountType, string options = "") { checkConnection(); object ofields, odata; int errCode; odata = wdc.tLogon(brokerID, departmentID, accountID, password, accountType, options, out ofields, out errCode); return(formatWD(null, ofields, null, odata, errCode)); }