MFC或者C++有好用的文件传输库么

RaceBug2010 2012-05-26 05:35:22
开发一个软件需要有文件传输功能,自己写怕传输速度、可靠性都没保证,求推荐第三方库。
...全文
151 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
RaceBug2010 2012-05-26
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 的回复:]

WININET的CInternetSession
C/C++ code

// create a session object to initialize WININET library
// Default parameters mean the access method in the registry
// (that is, set by the "Internet" icon in……
[/Quote]非常感谢
Eleven 2012-05-26
  • 打赏
  • 举报
回复
WININET的CInternetSession

// create a session object to initialize WININET library
// Default parameters mean the access method in the registry
// (that is, set by the "Internet" icon in the Control Panel)
// will be used.

CInternetSession sess(_T("My FTP Session"));

CFtpConnection* pConnect = NULL;

try
{
// Request a connection to ftp.microsoft.com. Default
// parameters mean that we'll try with username = ANONYMOUS
// and password set to the machine name @ domain name
pConnect = sess.GetFtpConnection(_T("ftp.microsoft.com"));

// use a file find object to enumerate files
CFtpFileFind finder(pConnect);

// start looping
BOOL bWorking = finder.FindFile(_T("*"));

while (bWorking)
{
bWorking = finder.FindNextFile();
_tprintf_s(_T("%s\n"), (LPCTSTR)finder.GetFileURL());
}
}
catch (CInternetException* pEx)
{
TCHAR sz[1024];
pEx->GetErrorMessage(sz, 1024);
_tprintf_s(_T("ERROR! %s\n"), sz);
pEx->Delete();
}

// if the connection is open, close it
if (pConnect != NULL)
{
pConnect->Close();
delete pConnect;
}

15,471

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 进程/线程/DLL
社区管理员
  • 进程/线程/DLL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧