上海期货交易CTP开发——修改密码/登出

CTP修改密码分为修改登录密码和修改资金密码,不支持修改银行账户密码。

 

一、修改密码

1、修改登录密码:

CThostFtdcUserPasswordUpdateField req = {0};  
strcpy(req.BrokerID, m_BrokerID);  
strcpy(req.UserID, m_UserID);  
req.OldPassword,41);  
req.NewPassword,41);  
ReqUserPasswordUpdate(&req,reqInfo.nRequestID);

 

 

2、修改资金密码

CThostFtdcTradingAccountPasswordUpdateField req = {0};  
strcpy(req.BrokerID, m_BrokerID);  
strcpy(req.AccountID, m_TradingAccounts[reqInfo.lAccIdx].AccountID);  
req.OldPassword;  
req.NewPassword;  
req.CurrencyID;  
ReqTradingAccountPasswordUpdate(&req,reqInfo.nRequestID);

 

二、登出:

CThostFtdcUserLogoutField req = {0};  
memcpy(req.BrokerID, m_BrokerID, sizeof(m_BrokerID));  
memcpy(req.UserID, m_UserID, sizeof(m_UserID));  
ReqTdUserLogout(&req,nRequestID);

 

 

 

 

 

分享到:

评论已关闭