必须把程序重启后,才能下载到最新的文件,我也不想用断点续传,代码如下:
CInternetSession ObjSession;
CFtpConnection* pConnection=
ObjSession.GetFtpConnection(g_StrFtpServIP,g_StrFtpUser,g_StrFtpPwd,21); for(int i=0;i<30;i++)
{
BoolSucc=pConnection->SetCurrentDirectory(g_StrBillDir);
if(!BoolSucc)
{
continue;
}
BoolSucc=pConnection->GetFile(ChFileName, ChFileName, FALSE);
if(BoolSucc)
{
break;
}
}
pConnection->Close();
delete pConnection;
ObjSession.Close();
CInternetSession ObjSession;
CFtpConnection* pConnection=
ObjSession.GetFtpConnection(g_StrFtpServIP,g_StrFtpUser,g_StrFtpPwd,21); for(int i=0;i<30;i++)
{
BoolSucc=pConnection->SetCurrentDirectory(g_StrBillDir);
if(!BoolSucc)
{
continue;
}
BoolSucc=pConnection->GetFile(ChFileName, ChFileName, FALSE);
if(BoolSucc)
{
break;
}
}
pConnection->Close();
delete pConnection;
ObjSession.Close();
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货