29 lines
962 B
C++
29 lines
962 B
C++
ReqUserLogin
|
|
{
|
|
CThostFtdcReqUserLoginField myreq = CThostFtdcReqUserLoginField();
|
|
memset(&myreq, 0, sizeof(myreq));
|
|
getChar(req, "MacAddress", myreq.MacAddress);
|
|
getChar(req, "UserProductInfo", myreq.UserProductInfo);
|
|
getChar(req, "UserID", myreq.UserID);
|
|
getChar(req, "TradingDay", myreq.TradingDay);
|
|
getChar(req, "InterfaceProductInfo", myreq.InterfaceProductInfo);
|
|
getChar(req, "BrokerID", myreq.BrokerID);
|
|
getChar(req, "ClientIPAddress", myreq.ClientIPAddress);
|
|
getChar(req, "OneTimePassword", myreq.OneTimePassword);
|
|
getChar(req, "ProtocolInfo", myreq.ProtocolInfo);
|
|
getChar(req, "Password", myreq.Password);
|
|
int i = this->api->ReqUserLogin(&myreq, nRequestID);
|
|
return i;
|
|
};
|
|
|
|
ReqUserLogout
|
|
{
|
|
CThostFtdcUserLogoutField myreq = CThostFtdcUserLogoutField();
|
|
memset(&myreq, 0, sizeof(myreq));
|
|
getChar(req, "UserID", myreq.UserID);
|
|
getChar(req, "BrokerID", myreq.BrokerID);
|
|
int i = this->api->ReqUserLogout(&myreq, nRequestID);
|
|
return i;
|
|
};
|
|
|