CString host=_T("10.10.10.21");
CString user=_T("abc");
CString password=_T("123456");
CInternetSession session(AfxGetApp()->m_pszAppName);
CFtpConnection *pConn = NULL;
pConn = session.GetFtpConnection(host,user,password);
if (pConn)
{
pConn->PutFile(_T("D:\\1.txt"), _T("Web\\RemoteFileName.txt"));
pConn->Close();
delete pConn;
session.Close();
}