Click to See Complete Forum and Search --> : test


rezame
September 18th, 2011, 12:55 PM
time_t t1=time(NULL);
HINTERNET hSession = InternetOpen(0, INTERNET_OPEN_TYPE_PRECONFIG, 0, 0, 0);
HINTERNET hService = InternetConnect(hSession, server, INTERNET_DEFAULT_FTP_PORT, user, pass, INTERNET_SERVICE_FTP, INTERNET_FLAG_PASSIVE, 0);
FtpSetCurrentDirectory(hService, path);
FtpPutFile(hService, szLocalFile, szRemoteFile, FTP_TRANSFER_TYPE_ASCII, 0);
if(FtpGetFile(hService, mR, mL, false, FILE_ATTRIBUTE_NORMAL, FTP_TRANSFER_TYPE_BINARY, 0))
{cout<<"true"<<"\n";}
else
{cout<<GetLastError();}
InternetCloseHandle(hService);
InternetCloseHandle(hSession);
time_t t2=time(NULL);
time_t t3=t2-t1;

alarcon
November 3rd, 2011, 11:17 AM
Test reply