2015-03-02 05:05:53 +00:00
|
|
|
ReqUserLogin
|
|
|
|
{
|
|
|
|
CSecurityFtdcReqUserLoginField myreq = CSecurityFtdcReqUserLoginField();
|
|
|
|
memset(&myreq, 0, sizeof(myreq));
|
|
|
|
getChar(req, "MacAddress", myreq.MacAddress);
|
2015-09-28 03:42:35 +00:00
|
|
|
getChar(req, "RandCode", myreq.RandCode);
|
2015-03-02 05:05:53 +00:00
|
|
|
getChar(req, "UserProductInfo", myreq.UserProductInfo);
|
|
|
|
getChar(req, "UserID", myreq.UserID);
|
|
|
|
getChar(req, "AuthCode", myreq.AuthCode);
|
|
|
|
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);
|
2015-09-28 03:42:35 +00:00
|
|
|
getChar(req, "HDSerialNumber", myreq.HDSerialNumber);
|
2015-03-02 05:05:53 +00:00
|
|
|
int i = this->api->ReqUserLogin(&myreq, nRequestID);
|
|
|
|
return i;
|
|
|
|
};
|
|
|
|
|
|
|
|
ReqUserLogout
|
|
|
|
{
|
|
|
|
CSecurityFtdcUserLogoutField myreq = CSecurityFtdcUserLogoutField();
|
|
|
|
memset(&myreq, 0, sizeof(myreq));
|
|
|
|
getChar(req, "UserID", myreq.UserID);
|
|
|
|
getChar(req, "BrokerID", myreq.BrokerID);
|
|
|
|
int i = this->api->ReqUserLogout(&myreq, nRequestID);
|
|
|
|
return i;
|
|
|
|
};
|
|
|
|
|