100分紧急求助!!!各位高手请帮忙。 怎么在Win95下面实现FTP,用CInternetSession和CFtpConnection不能运行。请高手指教!!急!!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我用了CInternetSession和CFtpConnection做了一个简单的FTP下载程序,但在运行的时候,出现“与应用程序连接的设备不能正常运行”,“应用程序出错!”,但在win98和win2k下运行正常,在win95下重新编译后还是不行,不知何故 代码如下:void CTestFTPDlg::OnButton1() { pSession=new CInternetSession(AfxGetAppName(),1,PRE_CONFIG_INTERNET_ACCESS); pConnect=pSession->GetFtpConnection("21.196.68.242","fxj","fxj1zgp"); if (pConnect!=NULL) { GetFileFromServer(); } else { delete pConnect; delete pSession; AfxMessageBox("连接失败!"); return; } pConnect->Close (); delete pConnect; delete pSession;}void CTestFTPDlg::GetFileFromServer(){ if (pConnect->GetFile("pjtemp1.dat","c:\\pjtemp1.dat",FALSE)) AfxMessageBox("下载成功!");} 启动MFC程序后,若没关闭,再启动就打开不了,应该怎么做?谢谢 GDi+ ondraw()问题 为什么我的域数据字段和表的属性字段不能对应 讨论一下如何看MSDN的例子。 求救:release还是出错!!!我都发了三个贴了!! 请问能否通过win32api函数将数据帧中奇偶校验位设定为0或1? WM_CLOSE和WM_DESTROY有何区别 一个创建字体的问题?? ctreectrl 和ctreeview有什么区别? 进程名字问题 急!请问怎么样给SDI界面的第一个窗口添加滚动条?谢谢!(在线等待) static text中的字体能修改吗?
void CTestFTPDlg::OnButton1()
{
pSession=new CInternetSession(AfxGetAppName(),1,PRE_CONFIG_INTERNET_ACCESS);
pConnect=pSession->GetFtpConnection("21.196.68.242","fxj","fxj1zgp");
if (pConnect!=NULL)
{
GetFileFromServer();
}
else
{
delete pConnect;
delete pSession;
AfxMessageBox("连接失败!");
return;
}
pConnect->Close ();
delete pConnect;
delete pSession;
}void CTestFTPDlg::GetFileFromServer()
{
if (pConnect->GetFile("pjtemp1.dat","c:\\pjtemp1.dat",FALSE))
AfxMessageBox("下载成功!");}