S
Shweta
Hi,
We are trying to buid an application in c++ which will have FTP
download and FTP resume download facility.FTP download is working
fine but there is a problem with resume download.
For FTP resume download the approach is,
1.Using FTPCommand() winAPI and issuing 'REST offset' command.then
using
'RETR filename' command to retrive the file from the given
offset.However the second command is failing.
The code snipet is
sRequest.Format(_T("REST %d"), 0);
//Send the resume request
HINTERNET *phFtpCommand = NULL;
BOOL bSuccess = FtpCommand(hFTPSession, FALSE, FTP_TRANSFER_TYPE_ASCII
, sRequest, 0, phFtpCommand);
//the above call succeeds
sRequest.Format("RETR TestFTP/Test.txt");
bSuccess = FtpCommand(hFTPSession, 1, FTP_TRANSFER_TYPE_ASCII ,
sRequest, 0, phFtpCommand);
The above function is failing.GetLastError() says that the parameter
is incorrect.
any pointers on how FTP resume is to be implemented are welcomed.
We are trying to buid an application in c++ which will have FTP
download and FTP resume download facility.FTP download is working
fine but there is a problem with resume download.
For FTP resume download the approach is,
1.Using FTPCommand() winAPI and issuing 'REST offset' command.then
using
'RETR filename' command to retrive the file from the given
offset.However the second command is failing.
The code snipet is
sRequest.Format(_T("REST %d"), 0);
//Send the resume request
HINTERNET *phFtpCommand = NULL;
BOOL bSuccess = FtpCommand(hFTPSession, FALSE, FTP_TRANSFER_TYPE_ASCII
, sRequest, 0, phFtpCommand);
//the above call succeeds
sRequest.Format("RETR TestFTP/Test.txt");
bSuccess = FtpCommand(hFTPSession, 1, FTP_TRANSFER_TYPE_ASCII ,
sRequest, 0, phFtpCommand);
The above function is failing.GetLastError() says that the parameter
is incorrect.
any pointers on how FTP resume is to be implemented are welcomed.