二
13
CFtpConnection *pconnection;
CInternetSession *session=new CInternetSession(AfxGetAppName(),1,PRE_CONFIG_INTERNET_ACCESS);
try
{
pconnection=session->GetFtpConnection(FtpAddress,UserName,Password);
}
catch(CInternetException *pEx)
{
WCHAR errror[1024]={0};
if(pEx->GetErrorMessage(ERROR,1024))
MessageBox(ERROR);
else
MessageBox(L”出现异常”);
}
if(pconnection->PutFile(L”C:\\ip.txt”,path))
MessageBox(L”上传成功!”);
else
MessageBox(L”上传失败!”);
pconnection->Close();
本文到目前为止还暂无回复