void OnDownLoad()

{

CInternetSession session;

CFtpConnection *pConnection = NULL;

CFtpFileFind *pFileFind = NULL;

CString csStr;

CString csFileName;

BOOL bContinue;


try

{

pConnection = session.GetFtpConnection( "220.67.202.123", "h7", "h7" );

pConnection->GetCurrentDirectory( csStr );

pFileFind = new CFtpFileFind( pConnection );

bContinue = pFileFind->FindFile( csStr );


while( bContinue )

{

bContinue = pFileFind->FindNextFile();

csFileName = pFileFind->GetFileName();


if( !pFileFind->IsDirectory() )

{

pConnection->GetFile( csFileName, csFileName );

}

}

catch (CFileException* e)

{

e->ReportError();

}

catch(CInternetException *e)

{

e->ReportError();

}

}


pConnection->Close();

delete pFileFind;

}


Snap1.bmp

'NativeCode > api' 카테고리의 다른 글

CSocket 과 CAsyncSocket에서 Thread문제  (0) 2010.03.19
HTTP 긁어오기 (소스파일 有)  (0) 2010.03.19
HTTPS GET - Download HTML from HTTPS URL  (0) 2010.03.19
CkLibrary  (1) 2010.03.19
Sendarp 사용법  (0) 2010.03.19

+ Recent posts