Contents - Index - Previous - Next


OnStartZipInfo Event 

 

Applies to

TVCLZip component

 

Declaration

property OnStartZipInfo: TStartZipInfo = procedure(Sender: TObject; NumFiles: Integer; TotalBytes: Comp; var EndCentralRecord: TEndCentral; var StopNow: Boolean); of object;

 

 

Description

The OnStartZipInfo event handler is executed just before the first file of an archive is to be zipped, giving you a chance to abort.  You also receive useful information as well as the chance to add a zip comment at the time of creating the zip file. 

 

IMPORTANT: Be sure to include kpZipObj in your USES list if you plan on using this event!  It has the required definition of the TEndCentral object.  

 

The paramaters are:  

 

NumFiles Total number of files that is about to be processed.  This may not be the actual number of files that ends up getting zipped for various reasons.  Check the return value of the Zip Method for the actual number of files that finally get zipped.  

TotalBytes Total number of uncompressed bytes that make up all of the files about to be zipped. 

StopNow Set this to True if you do not wish continue the zip operation. 

EndCentralRecord Use this to add a zip comment as follows:  

EndCentral.SetNewZipComment( 'This is a ZipComment' );