Reputation: 3040
I am attempting to use the TZipFile class to create a new zip file and add some files to it. I am able to add files to an existing zip file using this code:
TZipFile * zip = new TZipFile();
zip->Open(fileName, zmReadWrite);
zip->Add("C:\\0\\t.txt");
zip->Close();
However, I am not sure how I can create a new zip file in code, and then add files to it. I tried calling zip->Open
on a non-existent file thinking that maybe that would create the archive, however that just caused an access violation.
Upvotes: 1
Views: 1143