資源簡(jiǎn)介
目前應(yīng)用非常廣泛的期貨風(fēng)控系統(tǒng),提供了類似CTP的接口,原來的代碼幾乎不用修改就能夠使用

代碼片段和文件信息
#include?“CMarketSpi.h“
#include?
extern?int?gnReady;
//?登錄請(qǐng)求響應(yīng)
void?CMarketSpi::OnRspUserLogin(CThostFtdcRspUserLoginField?*pRspUserLogin?CThostFtdcRspInfoField?*pRspInfo?int?nRequestID?bool?bIsLast)
{
printf_s(“UserId=%s“?pRspUserLogin->UserID);
//?添加防錯(cuò)處理?added?by?liqy?2013-4-24
//if?(?pUserlink?==?NULL?)
//{
// //pMainDlg->A_Log.LogFile(?ALOGPACK::LOG_ERROR?“[Error][OnRspUserLogin][pUserlink==NULL]“?);
// //return;
//}
//?end?add
//?有可能返回為空,登錄應(yīng)答有可能返回多個(gè),不過,第一次返回一定不為空,所以,后續(xù)多余返回為空,可以不處理
if?(pRspInfo?==?NULL)
{
//?added?by?liqy?2012-11-12
if?(pRspUserLogin?==?NULL)
{
//pMainDlg->A_Log.LogFile(?ALOGPACK::LOG_ERROR?“[Error][OnRspUserLogin][pRspInfo==Null][pRspUserLogin==Null]Index[%d]Water[%d]“
//pUserlink->m_S_Index?pUserlink->m_S_Water?);
}
else
{
//pMainDlg->A_Log.LogFile(?ALOGPACK::LOG_ERROR?“[Error][OnRspUserLogin][pRspInfo==Null][pRspUserLogin!=Null]Index[%d]Water[%d]“
//pUserlink->m_S_Index?pUserlink->m_S_Water?);
}
return;
}
//?added?by?liqy?2012-11-12
//?記錄登錄應(yīng)答返回內(nèi)容
if?(pRspUserLogin?==?NULL)
{
//pMainDlg->A_Log.LogFile(?ALOGPACK::LOG_INFO?“[OnRspUserLogin][pRspInfo!=Null][pRspUserLogin==Null]Index[%d]Water[%d]“
//pUserlink->m_S_Index?pUserlink->m_S_Water?);
}
else
{
ZF_STRNCPY(MaxOrderRef?pRspUserLogin->MaxOrderRef);
//pMainDlg->A_Log.LogFile(?ALOGPACK::LOG_INFO?“[OnRspUserLogin][pRspInfo!=Null][pRspUserLogin!=Null]Index[%d]Water[%d]“
//pUserlink->m_S_Index?pUserlink->m_S_Water?);
}
//?更新等待超時(shí)狀態(tài)?added?by?lm?2013-1-6
//pMainDlg->m_MsgManager.Msg_SHFELogFlag_State(?pUserlink->m_S_Water?3?);
gnReady?=?1;
if?(pRspUserLogin?==?NULL)
{
//pUserlink->Rsp_SHFE_Login(?NULL?&RspInfo?nRequestID?bIsLast?);
}
else
{
//pUserlink->Rsp_SHFE_Login(?&RspUserLogin?&RspInfo?nRequestID?bIsLast?);
}
}
void?CMarketSpi::OnFrontConnected()
{
}
void?CMarketSpi::OnFrontDisconnected(int?r)
{
}
?
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件??????53960??2015-06-18?09:01??ZhiFuTest\channeldataformat.h
?????文件???????2074??2016-12-21?13:09??ZhiFuTest\CMarketSpi.cpp
?????文件????????719??2016-12-21?09:39??ZhiFuTest\CMarketSpi.h
?????文件???????4148??2017-11-01?09:01??ZhiFuTest\CTradeSpi.cpp
?????文件???????3454??2017-10-31?15:06??ZhiFuTest\CTradeSpi.h
?????文件???????2032??2017-11-28?13:49??ZhiFuTest\Debug\cl.command.1.tlog
?????文件??????64050??2017-11-28?13:49??ZhiFuTest\Debug\CL.read.1.tlog
?????文件???????1134??2017-11-28?13:49??ZhiFuTest\Debug\CL.write.1.tlog
?????文件??????53982??2017-11-28?13:49??ZhiFuTest\Debug\CMarketSpi.obj
?????文件??????76350??2017-11-28?13:49??ZhiFuTest\Debug\CTradeSpi.obj
?????文件??????????2??2017-11-28?13:49??ZhiFuTest\Debug\li
?????文件??????????2??2017-11-28?13:49??ZhiFuTest\Debug\li
?????文件??????????2??2017-11-28?13:49??ZhiFuTest\Debug\li
?????文件??????????2??2017-11-28?13:49??ZhiFuTest\Debug\li
?????文件??????????2??2017-11-28?13:49??ZhiFuTest\Debug\li
?????文件??????????2??2017-11-28?13:49??ZhiFuTest\Debug\li
?????文件??????????2??2017-10-27?13:48??ZhiFuTest\Debug\li
?????文件??????????2??2017-10-27?13:48??ZhiFuTest\Debug\li
?????文件??????????2??2017-10-27?13:48??ZhiFuTest\Debug\li
?????文件??????????2??2017-10-27?13:48??ZhiFuTest\Debug\li
?????文件???????1694??2017-11-28?13:49??ZhiFuTest\Debug\li
?????文件???????2722??2017-11-28?13:49??ZhiFuTest\Debug\li
?????文件????????952??2017-11-28?13:49??ZhiFuTest\Debug\li
?????文件?????305390??2017-11-28?13:49??ZhiFuTest\Debug\main.obj
?????文件????????376??2017-11-28?13:49??ZhiFuTest\Debug\mt.command.1.tlog
?????文件????????152??2017-11-28?13:49??ZhiFuTest\Debug\mt.read.1.tlog
?????文件????????286??2017-11-28?13:49??ZhiFuTest\Debug\mt.write.1.tlog
?????文件????????508??2017-11-28?13:49??ZhiFuTest\Debug\rc.command.1.tlog
?????文件????????258??2017-11-28?13:49??ZhiFuTest\Debug\rc.read.1.tlog
?????文件????????266??2017-11-28?13:49??ZhiFuTest\Debug\rc.write.1.tlog
............此處省略86個(gè)文件信息
評(píng)論
共有 條評(píng)論