请给我一个从一FTP服务器上定时收取一文件的程序? 请给我一个从一FTP服务器上定时收取一文件的程序?谢谢! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 请问下面这段程序应该怎样改才能实现重FTP服务器下载文件?是否要打开FTP功能才能下载?有没有某些网站的FTP用户名和密码?给我一个试程序!谢谢!void CFTPReceive::OnButtonReceive() { // TODO: Add your control notification handler code here// *** My Code is Start!//(2003.12.30) CFTPReceive dlg; CString host; CString user; CString password; CString filename; short port; host = dlg.m_Host; user = dlg.m_User; password = dlg.m_Password; filename = dlg.m_ReceiveFile;// filename = "D:\SXYST\ScQtYstQdN.ini"; port = dlg.m_sPort; TRACE(":%s:%s:%s:%s\n", host, user, password, filename); //生成CInternetSession变量 CInternetSession ses; //打开FTP连接 CFtpConnection* pFTP=ses.GetFtpConnection("61.139.77.15", user, password); if (pFTP) { if (!pFTP->GetFile(filename,filename)) { MessageBox("接收文件失败??"); } else { MessageBox("接收文件成功!"); } pFTP->Close(); delete pFTP; ses.Close(); } else { MessageBox("Cannot Connect"); } //打开文件// CInternetFile* pF=pFTP->OpenFile("abc.exe");// *** My Code is End! } webbrowser控件如何 捕获鼠标事件 我做一个安全锁程序,但是在XP安全,在2003不安全了!有什么方法禁止CTRL+ALT+DEL给合键? 求助! OPENGL光照问题 DLL这样写为什么不能返回值呢?(看里面代码) 谁有c++实现的邻接多重表的详细代码? vs 的spy ++是什么作用的? 关于CFile读取文本文件数据到数组中的问题!(急!) 在VC中,下面的语句是什么意思?(比较初级的问题) 请教vc速成方法,有奖,100分 新手问:应用程序中怎么收到COM组件的事件 如何启动IE啊?
是否要打开FTP功能才能下载?
有没有某些网站的FTP用户名和密码?给我一个试程序!谢谢!
void CFTPReceive::OnButtonReceive()
{
// TODO: Add your control notification handler code here// *** My Code is Start!
//(2003.12.30)
CFTPReceive dlg;
CString host;
CString user;
CString password;
CString filename;
short port; host = dlg.m_Host;
user = dlg.m_User;
password = dlg.m_Password;
filename = dlg.m_ReceiveFile;
// filename = "D:\SXYST\ScQtYstQdN.ini";
port = dlg.m_sPort; TRACE(":%s:%s:%s:%s\n", host, user, password, filename); //生成CInternetSession变量
CInternetSession ses; //打开FTP连接
CFtpConnection* pFTP=ses.GetFtpConnection("61.139.77.15", user, password); if (pFTP)
{
if (!pFTP->GetFile(filename,filename))
{
MessageBox("接收文件失败??");
}
else
{
MessageBox("接收文件成功!");
}
pFTP->Close();
delete pFTP;
ses.Close();
}
else
{
MessageBox("Cannot Connect");
} //打开文件
// CInternetFile* pF=pFTP->OpenFile("abc.exe");
// *** My Code is End!
}