Problem with TIdFTP->Get()

Giganews Newsgroups
Subject: Problem with TIdFTP->Get()
Posted by:  virtek (virte…@hotmail.com)
Date: Sat, 29 Nov 2003

Hi!

The problem is I need to use TIdFTP->Get() to retreive file "file.zip", but
I want to get only part of the file. if the file is 123,456 bytes, I want to
get data from let's say... offset 10000 to 100000.

This is how I tried it:
{

TIdFTP *ftp = new TIdFTP(this);
TFileStream *Stream = new TFileStream("file.zip",fmCreate);

Stream->Seek(10000);
Stream->Size(100000-10000);

ftp->Get("file.zip",Stream,true);
delete Stream,ftp;

}
The problem is that it downloads data until the end of file and ends up with
the entire size of file, while it suppose to be only part of it...

Any idia?

Thanks in advance,

David

Replies