I'm trying to read a file from a *.zip
to TMemoryStream
:
String fName = "myInfo.txt";
std::auto_ptr<TMemoryStream> input(new TMemoryStream);
std::auto_ptr<TStringList> sFile(new TStringList);
std::auto_ptr<TZipFile> zip(new TZipFile());
TZipHeader fHeader;
zip->Open(file, zmRead);
zip->Read(fName, input.get(), fHeader);
...
but I get an error:
E2285 Could not find a match for 'TZipFile::Read(UnicodeString,TMemoryStream *,TZipHeader)'
I am an amateur programmer, and I would really appreciate your help. Unfortunately, Google does not find an answer in this topic.
What am I doing wrong?
I was looking for examples of using TZipFile.Read for C++Builder.