//FTP:
//首先电脑要装IIS服务(internet information service),然后共享指定文件夹,设为默认FTP服务器
//上传到服务器指定目录
CInternetSession *internetSession=NULL;
internetSession=new CInternetSession(AfxGetAppName(),1,PRE_CONFIG_INTERNET_ACCESS);
CFtpConnection * ftpConnection = NULL;
ftpConnection=internetSession->GetFtpConnection(“192.168.0.2”,NULL,NULL,21,TRUE);
CString strDesPath = “./” +theApp.m_strAEIFileFullPath.Mid(theApp.m_strAEIFileFullPath.Find("_") - 2);
BOOL b=ftpConnection->PutFile(theApp.m_strAEIFileFullPath,strDesPath,FALSE);
internetSession->Close();
盘符映射:
//先做盘符映射,之后想操作自己电脑一样复制文件
CopyFile(stsrc,strDest,false);