Copyright: Copyright ©1995-1998 Xceed Software Inc. (v3500)


Xceed Zip Compression Library Contents
Contents

Click on the topic you want to jump to.

Xceed Zip Compression Library • Introduction • Features • Free trial version • Installation instructions • Files in this library Xceed Zip Components • Overview of the VCL • Overview of the VBX • Overview of the OCX • Properties • Methods • Events • Types (Delphi & C++Builder) • Constants • Error Codes • Functions (Delphi & C++Builder) Xceed Zip Self-Extractor Module • Introduction • Features • Free trial version • Installation instructions • Overview	Distribution • About the DLLs • About the OCX • About the Self-Extractor binaries • Distribution Xceed Zip Sample Applications • Overview Legal Information • License, copyright and disclaimer • Acknowledgments Contact and product information • Xceed's address, phones and email • Order Form with pricing information • How to order Xceed Zip • Upgrades • Technical support • Year 2000 compliance Help file revision


Xceed Zip Compression Library Introduction
Introduction

Welcome to the Xceed Zip Compression Library!

The Xceed Zip Compression Library is a judiciously designed data compression library from Xceed that gives your applications the capability to create and manipulate the latest industry standard PKZip 2.04g Zip files. The Xceed Zip Compression Library steps beyond providing the features and functionality you need and expect from a compression toolkit. Not only does it add to, extract from, list, fix and test the contents of a Zip archive, it gives your Windows applications the real-time knowledge and control they need to be truly interactive. Your application receives detailed information about the current compression activity, and can be consulted by the library when choices need to be made. With the Xceed Zip Compression Library, you can easily integrate data-compression technology into today's Windows applications in no time.

The Xceed Zip Compression Library also supports compressing strings and buffers directly in memory. This allows Windows applications to compress data without writing to Zip files, and is perfect for compressing database blobs or compressing large internal application data.

The library comes with full support for a variety of languages, including Visual Basic, Delphi, C++Builder, Visual C++ and Access 97. Xceed Zip also supports any development language that can use VBX or OCX controls such as Visual FoxPro 5.0, Office 97 and PowerBuilder. The VBX, OCX and VCL controls that come with Xceed Zip provide you with all the properties, methods and events you'll need in order to easily accomplish your data-compression tasks. The VBX and VCL controls make use of our fast and compact DLLs that perform the compression and the decompression. The OCX has the compression and decompression routines built-in.

The Xceed Zip Compression Library is feature-packed, easy to use, and best of all, you have a fully functional free trial version that includes everything you need to get started right away. It comes with the Xceed Zip VBX, OCX and VCL controls and the complete online documentation that is packed with examples for Visual Basic, Delphi and C++Builder. You also get complete sample applications for these languages as well as for Visual C++ and Access 97.

We invite you to download the free trial version and start integrating Xceed Zip into one of your existing programs right away. All you really have to do is add the control to a form, set one or two properties, and off you go!

All Xceed products include comprehensive online documentation, free expert technical support, royalty-free distribution and a 60-day money-back guarantee. If you're not satisfied for any reason, return the product for a full refund of the purchase price.

Xceed is devoted to the development and support of the Xceed Zip Compression Library and is determined to pursue its evolution. Visit our web site at www.xceedsoft.com for the most up-to-date information on upgrades, add-on modules for Xceed Zip and other new Xceed developer tools.


Xceed Zip Features
Xceed Zip Compression Library Features

Major operations

•	Allows Zip files to span multiple disks.

•	Compress files and add them to a Zip file.

•	Compress and uncompress strings or buffers directly in memory. New in v3.0!

•	Count the number of items in a Zip file.

•	Create a new Zip file.

•	Create self-extracting Zip files (Requires the Xceed Zip Self-Extractor Module or a 3rd party self-extractor binary). New in v3.0!

•	Delete files in a Zip file.

•	Fix a corrupted Zip file.

•	Obtain a detailed list of files in a Zip file.

•	Retrieve information on a specific file by filename or index.

•	Test the integrity of a Zip file.

•	Uncompress files from a Zip file.

Other features

•	Add and retrieve comments for individual files in the Zip file.

•	Automatic full yield so other applications do not halt during processing.

•	Clear disk(s) before writing the Zip file.

•	Convert existing Zip files into self-extracting Zip files. New in v3.0!

•	Compress entire directories and their contents, or even a list of directories.

•	Compress only files newer than those already in the Zip file.

•	Delete files after adding them to the Zip file.

•	Encrypt files that are being added to a Zip file.

•	Get and set the comment for the entire Zip file.

•	Have specified types of files directly copied into a Zip file without compression.

•	Include complete pathnames for each file in a Zip file.

•	Include drive volume label in a Zip file.

•	Include or Exclude a list of files from the main list of files to process.

•	Include system and hidden files when compressing.

•	Limit operation to files modified after a specific date.

•	Long filenames (32-bit components only).

•	Manipulate self-extracting Zip files without disturbing their self-extracting ability.

•	Rename files and their pathnames as they are being added or extracted. New in v3.0!

•	Set the compression speed.

•	Specify the directory where files will be uncompressed to.

•	Specify a list of files to process.

•	Specify files using wildcards.

•	Specify the name and location of a Zip file.

•	Uncompress only files that are newer than the ones already existing on disc.

•	Update the date of the Zip file to the date of the most recent file it contains.

•	Work on temporary copies of Zip files, for maximum safety. Improved in v3.1!

•	You can specify the location of the temporary Zip file.

Zip compatibility

•	Xceed Zip is 100% compatible with the latest Zip file format. Regular and multi-disk Zip files created by Xceed Zip can be used by PKZip 2.04g, and vice-versa.

Library interactivity features

•	All operations can be aborted.

•	Notifies your application whenever a file is being compressed, deleted, fixed, tested, updated or uncompressed.

•	Notifies your application when and why a specific file cannot be processed.

•	Notifies your application when a file being uncompressed is about to replace an existing file. Allows your application, or the user of your application, to choose among 5 different actions to be taken, including renaming the file. This option can be disabled and the choice can be made once and for all before starting the uncompress operation.

•	Permits your application, or the user of your application, to specify encryption and decryption passwords for each file, as needed. This option can be disabled and a single password can be specified for the whole Zip file. Improved in v3.0!

•	Provides complete specifications and information for the current file being processed.

•	Provides your application with information on how far along the processing of each individual file has progressed. Your application knows when a file has been entirely processed, and has access to the achieved compression ratio, compressed size and other information as they become available.

•	Provides a real-time global status report for the entire Zip or Unzip operation, including the total number of bytes and files to process, the amount of bytes and files processed so far, as well as completion percentages that you can directly use to update your progress or status bars. New in v3.0!

•	Informs your application that it should prompt the user to insert a specific disk when handling multiple-disk zip files.


Xceed Zip Free trial version
Xceed Zip Compression Library Free trial version

The free trial version of the Xceed Zip Compression Library has everything you need to get started, including the complete online help, all 16 and 32-bit VCL, VBX and OCX controls, and all the sample applications with fully commented source codes. A free trial version of the Xceed Zip Self-Extractor Module is also included.

Programs using the free trial version will only function in the context of a programming environment, so you can design, code and test your applications. You are not permitted to distribute applications that use the free trial version. In fact, the free trial version will not function in stand-alone applications when your development environment is not present. You must purchase a registered version of the Xceed Zip Compression Library and correctly install the license files if you wish to create applications you can distribute.

Please see the How to order section for ordering information.


Xceed Zip Files Root installation directory
Files in this library (Root installation directory)

README.TXT: Text file inviting you to follow the installation instructions once you have successfully run the Xceed Zip setup program. This file also contains a copy of your registration serial number if you did not purchase Xceed Zip directly from Xceed Software.

CONTROLS\ subdirectory: Contains all the components that come with Xceed Zip.

LICENSES\ subdirectory: Contains the license files for registered users.

HELP\ subdirectory: Contains the Xceed Zip online documentation help file.

SAMPLES\ subdirectory: Contains the sample applications Xceed has written for you.

SFX\ subdirectory: Contains the Xceed Zip Self-Extractor module support files.


Xceed Zip Files Controls\ subdirectory
Files in this library (Controls\ subdirectory)

The Controls\ subdirectory contains all the components that come with Xceed Zip. The components are grouped into the following subdirectories:

VBX subdirectory:

XCEEDZIP.VBX: This is the VBX control that you will add to your toolbox in 16-bit Visual Basic 3.0, 4.0 and other languages that can use VBXs. It provides you with simple properties, methods and events that encapsulate all of the Xceed Zip Compression Library functionality. It requires the 16-bit DLLs found in the DLLs directory listed below.

XCDTYPES.BAS: This file contains all the declarations that are useful when developing 16-bit VB 3.0 and VB 4.0 applications that use the Xceed Zip Compression Library. The sample application uses declarations from this file.

OCX subdirectory:

XCDZIP35.OCX: This is the 32-bit ActiveX control that you can use in any 32-bit development language that supports OCXs. It encapsulates all of the functionality of the Xceed Zip Compression Library, and doesn't require any of the Xceed Zip DLLs listed below. See About the OCX for more information.

XCDTYPES.BAS: This file contains all the declarations that are useful when developing 32-bit VB 4.0 and 5.0 applications that use the Xceed Zip Compression Library. The sample application uses declarations from this file.

DLLs subdirectory:

XCDZIP.DLL, XCDUNZIP.DLL: These 16-bit DLLs are required by the Delphi 1 VCL and the 16-bit VBX.

XCDZIP32.DLL, XCUNZ32.DLL: These 32-bit DLLs are required by the Delphi 2, Delphi 3, Delphi 4, C++Builder 1.0 and C++Builder 3.0 VCLs.

See About the DLLs for more information.

Delphi1 subdirectory:

XCEEDZIP.DCU: This is the Delphi 1 VCL component that you will add to your component palette in Delphi 1 It provides you with simple properties, methods and events that encapsulate all of the Xceed Zip Compression Library functionality. It requires the 16-bit DLLs found in the DLLs directory listed below.

XCEEDZIP.DCR: This file contains the Delphi 1 VCL component icon that appears in the component palette. Always keep it in the same directory as your XCEEDZIP.DCU file.

Delphi2 subdirectory:

XCDZIP32.DCU, XCDZIP32.DCR: These are the Delphi 2 versions of the files listed in the Delphi 1 section above.

Delphi3 subdirectory:

XCEEDZIP.DPL: This is the Delphi 3 package library. It is used by Delphi 3 to install the VCL component into your Delphi 3 environment. The package library, along with the VCL, provides you with simple properties, methods and events that encapsulate all of the Xceed Zip Compression Library functionality. It requires the 32-bit DLLs found in the DLLs directory listed above.

XCDZIPD3.DCU: This is the Delphi 3 VCL component. It is automatically used by the Delphi 3 package library above. This file must remain in the same directory as the XCEEDZIP.DPL file.

XCDZIPD3.DCR: This file contains the Delphi 3 VCL component icon. It must also always be kept in the same directory as the XCEEDZIP.DPL file.

XCEEDZIP.DPK: This file contains the source for the Delphi 3 VCL package library. This file is useful for those that wish to create runtime packages that contain the Xceed Zip VCL.

XCEEDZIP.RES: This file contains version resource information for the XCEEDZIP.DPK file described above.

Delphi4 subdirectory:

XCEEDZIP.BPL: This is the Delphi 4.0 package library. It is used by Delphi 4.0 to install the VCL component into your Delphi environment. The package library, along with the actual VCL below, provides you with simple properties, methods and events that encapsulate all of the Xceed Zip Compression Library functionality. It requires the 32-bit DLLs found in the DLLs directory listed above.

XCDZIPD4.DCU: This is the Delphi 4 VCL component. It is automatically used by the Delphi 4 package library above. This file must remain in the same directory as the XCEEDZIP.BPL file.

Cbuild1 subdirectory:

XCDZIPC1.OBJ: This is the C++Builder 1.0 VCL component that you will add to your C++Builder 1.0 component palette. It provides you with simple properties, methods and events that encapsulate all of the Xceed Zip Compression Library functionality. It requires the 32-bit DLLs found in the DLLs directory listed above.

XCDZIPC1.HPP: This is the header file that you should include in C++Builder 1.0 projects that use the Xceed Zip VCL.

XCDZIPC1.DCR: This file contains the C++Builder 1.0 VCL component icon. It must be kept in the same directory as the XCDZIPC1.OBJ file.

Cbuild3 subdirectory:

XCEEDZIP.BPL: This is the runtime C++Builder 3.0 package library. It is used by C++Builder 3.0 to install the VCL component into your C++Builder 3.0 environment. The package library, along with the actual VCL below, provides you with simple properties, methods and events that encapsulate all of the Xceed Zip Compression Library functionality. It requires the 32-bit DLLs found in the DLLs directory listed above.

XCDZIPC3.OBJ: This is the C++Builder 3.0 VCL.

XCDZIPC3.HPP: This is the header file that you should include in C++Builder 3.0 projects that use the Xceed Zip VCL.

XCEEDZIP.LIB: A library for static linking.

XCEEDZIP.BPI: An import library created for the XCEEDZIP.BPL file above.


Xceed Zip Files Licenses\ subdirectory
Files in this library (Licenses\ subdirectory)

The Licenses\ directory is present only in the registered version of the Xceed Zip Compression Library. It contains the license files that allow you to create distributable applications that use the Xceed Zip VBX and OCX and the Xceed Zip Self-Extractor Module. These license files must not be distributed with your applications. The license files must be present when you are compiling your applications. After that, they are no longer necessary. If you get a registration message when you run your completed projects, your license file(s) were not correctly installed when you compiled your projects. Delphi and C++Builder VCL users do not need these license files  the VCLs have built-in license files.

XCDZPVBX.LIC: This is the license file for the 16-bit VBX component. It must be placed in your Windows directory (not the Windows\System directory!), and it must be accessible when you are instructing VB to make your project's compiled .EXE file.

XCDZPOCX.LIC: This is the license file for the 32-bit OCX component. It must be placed in the same directory where the currently active XCDZIP35.OCX file is located, and it must be accessible when you build finished executables that use the Xceed Zip OCX.

XCDZPSFX.LIC: This is the license file provided only to users that own a registered copy of the Xceed Zip Self-Extractor Module. It allows you to use all the functionality that the Xceed Zip Self-Extractor Module provides. VBX users must place it in the same directory as their XCDZPVBX.LIC file. OCX users must place it in the same directory as their XCDZPOCX.LIC file. If this license file is not correctly installed when you compile your applications, all self-extracting Zip files created with the Self-Extractor Module will be considered trial versions.


Xceed Zip Files Help\ subdirectory
Files in this library (Help\ subdirectory)

XCEEDZIP.HLP: This is the Windows help for the Xceed Zip Compression Library. It is a complete manual that you can read through, containing general information on the Xceed Zip Compression Library and the Xceed Zip Self-Extractor Module, Installation instructions, Ordering instructions, etc.

XCEEDZIP.KWF: This is the keyword file used by Delphi 1.0 to integrate the online help into the development environment and provide context-sensitive online help.


Xceed Zip Files Samples\ subdirectory
Files in this library (Samples\ subdirectory)

This directory contains all the sample application source codes that come with Xceed Zip. Read more about these sample applications in the Sample Application Overview topic. Each fully supported language has a sample application in one of the following subdirectories:

VB3 subdirectory:

XZIPDEMO.MAK: This is the Visual Basic 3.0 project file for the sample application. Load this file into Visual Basic by selecting the Open Project item from the File menu.

XCDTYPES.BAS: This file contains all the declarations that are useful when developing 16-bit VB applications that use the Xceed Zip Compression Library. The sample application uses declarations from this file.

XZIPDEMO.BAS: This file contains declarations and a general-purpose Error Handler used by the sample application that you can use in your own applications.

XZIPDEMO.FRM: This is the main form for the sample application.

XZIPDEMO.FRX: Contains binary information (icons, etc.) required for the main form.

EXTRACT.FRM: This is the form designed to allow a user to select a directory to extract files to.

SELFEXTR.FRM: This is the form designed to let you customize a few of the Xceed Zip Self-Extractor Module features so you can create self-extracting Zip files.

VB4 subdirectory:

XZIPDEMO.MAK: This is the 32-bit Visual Basic 4.0 project file for the sample application. Load this file into 32-bit Visual Basic 4.0 by selecting the Open Project item from the File menu.

XCDTYPES.BAS: This file contains all the declarations that are useful when developing VB 4.0 applications that use the Xceed Zip Compression Library. The sample application uses declarations from this file.

XZIPDEMO.BAS: This file contains declarations and a general-purpose Error Handler used by the sample application that you can use in your own applications.

XZIPDEMO.FRM: This is the main form for the sample application.

XZIPDEMO.FRX: Contains binary information (icons, etc.) required for the main form.

EXTRACT.FRM: This is the form designed to allow a user to select a directory to extract files to.

EXTRACT.FRX: Contains binary information (icons, etc.) required for the extract form.

CFGSFX.FRM: This is the form designed to let you customize a few of the Xceed Zip Self-Extractor Module features so you can create self-extracting Zip files.

CFGSFX.FRX: Contains binary information (icons, etc.) required for the self-extractor configuration form.

VB5 subdirectory:

Contains the Visual Basic 5.0 version of the files listed in the VB4 subdirectory above.

Cbuild1 subdirectory:

XZIPDEMO.MAK: This is the project file for the C++ Builder 1.0 sample application. Load this project file directly into C++ Builder and all the files listed below will automatically be accessible.

MAINMN.DFM: This is the main form containing the sample application's graphical interface.

MAINMN.CPP: This is the fully commented C++ code for the main form.

MAINMN.H: Include file for the main form.

SFXCFG.DFM: This is the form designed to let you customize a few of the Xceed Zip Self-Extractor Module features so you can create self-extracting Zip files.

SFXCFG.CPP: Contains binary information (icons, etc.) required for the self-extractor configuration form.

SFXCFG.H: Include file for the self-extractor configuration form.

TOOLS.CPP: This source file contains some useful routines used by the sample application that you can use in your own applications.

TOOLS.H: Include file for the Tools source file.

Cbuild3 subdirectory:

Contains the C++Builder 3.0 version of the files listed in the Cbuild1 subdirectory above.

Delphi1 subdirectory:

XZIPDEMO.DPR: This is the Delphi 1.0 project file for the sample application. Load this file into Delphi by selecting the Open Project item from the File menu.

MAINFM.DFM: This is the form containing the sample application's graphical interface.

MAINFM.PAS: This is the fully commented Delphi 1.0 source code for the sample application. Feel free to use portions of this source code in your own applications.

SFXFM.DFM: This is the form designed to let you customize a few of the Xceed Zip Self-Extractor Module features so you can create self-extracting Zip files.

SFXFM.PAS: This is the source code for the self-extractor configuration form.

Delphi2 subdirectory:

XZIPDEMO.DPR: This is the Delphi 2.0 project file for the sample application. Load this file into Delphi by selecting the Open... item from the File menu.

MAINFM.DFM: This is the form containing the sample application's graphical interface.

MAINFM.PAS: This is the fully commented Delphi 2.0 source code for the sample application. Feel free to use portions of this source code in your own applications.

SFXOPTFM.DFM: This is the form designed to let you customize a few of the Xceed Zip Self-Extractor Module features so you can create self-extracting Zip files.

SFXOPTFM.PAS: This is the source code for the self-extractor configuration form.

Delphi3 subdirectory:

Contains the Delphi 3.0 version of the files listed in the Delphi2 subdirectory above.

Delphi4 subdirectory:

Contains the Delphi 4.0 version of the files listed in the Delphi2 subdirectory above.

VisualC4 subdirectory:

BASIC.MAK: This is the Visual C++ 4.0 and 5.0 project makefile for the sample application. To open the sample application project in Visual C++ 4.0 or 5.0, select Open Workspace from the File menu and load this file. Visual C++ 5.0 will ask you if you want to convert the makefile - we recommend that you do.

BASIC.CPP, BASIC.H: The sample application object files.

BASICDLG.CPP, BASICDLG.H: Simple dialog box that uses the Xceed Zip Compression Library.

OPTIONS.CPP, OPTIONS.H: Options dialog box.

XCEEDZIP.CPP, XCEEDZIP.H, PICTURE.CPP, PICTURE.H: Wrapper class files for the Xceed Zip OCX component. The MFC ClassWizard creates them automatically when you insert the Xceed Zip OCX into a project.

BASIC.RC, RESOURCE.H, RES\BASIC.RC2, RES\ZIP.ICO: Resource files for the project and the dialogs.

BASIC.CLW: Class information file.

Access97 subdirectory:

XZIPDEMO.MDB: This is the Access 97 sample application project file. It contains the entire sample application written in VBA.


Xceed Zip Files Sfx\ subdirectory
Files in this library (Sfx\ subdirectory)

XCDSFX16.BIN: This is the 16-bit self-extractor binary. It is used by the Xceed Zip Compression Library whenever it is creating 16-bit self-extracting Zip files that use the Xceed Zip Self-Extractor Module. This file must be available somewhere on the machine that is running your application and that is creating a self-extracting Zip file. You will let Xceed Zip know where to find this file by setting the SfxBinary property. This file can be renamed if you desire. Xceed Zip will still recognize it as a 16-bit Xceed Zip Self-Extractor binary.

XCDSFX32.BIN: This is the 32-bit equivalent of the XCDSFX16.BIN file.

SAMPLE.CFG: This is a sample configuration file that is fully commented and that you should use as a starting point for creating your own self-extractor configuration files. All the customizable options you can configure with the properties built-into Xceed Zip can be customized in the configuration file. When using configuration files, you will set the SfxConfigFile property to point to the configuration to use when creating your self-extracting Zip files. Configuration files can have any filename you desire.


Xceed Zip general installation instructions
Installation instructions

The Xceed Zip Compression Library setup utility will copy all the necessary files into one directory (the default installation directory is C:\XCEEDZIP), but there are supplemental steps you must take to complete the installation, based on which development language you are using.

Click on one of the following links for instructions specific to your language.

•	Installing the 16-bit VBX in VB 3.0

•	Installing the 16-bit VBX in VB 4.0/16-bit

•	Installing the 32-bit OCX in VB 4.0/32-bit

•	Installing the 32-bit OCX in VB 5.0

•	Installing the 16-bit VCL in Delphi 1.0

•	Installing the 32-bit VCL in Delphi 2.0

•	Installing the 32-bit VCL in Delphi 3.0

•	Installing the 32-bit VCL in Delphi 4.0

•	Installing the 32-bit VCL in Borland C++Builder 1.0

•	Installing the 32-bit VCL in Borland C++Builder 3.0

•	Installing the 32-bit OCX in Visual FoxPro 5.0

•	Installing the 32-bit OCX in Word 97 and Excel 97

•	Installing the 32-bit OCX in Access 97

•	Installing the 32-bit OCX in Visual C++ 4.0

•	Installing the 32-bit OCX in Visual C++ 5.0

•	Installing the 32-bit OCX in other 32-bit development environments


Xceed Zip Self-Extractor installation instructions
Installation instructions for the Xceed Zip Self-Extractor Module

Free trial version of the Xceed Zip Self-Extractor Module

The free trial version of the Xceed Zip Self-Extractor Module is included with both the free trial version of the Xceed Zip Compression Library, as well as the registered version of the Xceed Zip Compression Library thats not registered for using the Xceed Zip Self-Extractor Module. There are no further installation steps to take if you dont have the registered version of the Xceed Zip Self-Extractor Module.

Registered version of the Xceed Zip Self-Extractor Module

The registered version of the Xceed Zip Self-Extractor Module is shipped separately from the registered version of the Xceed Zip Compression Library. You must run the setup utility that comes with your registered Xceed Zip Self-Extractor Module. The setup utility will prompt you for a directory to install the Xceed Zip Self-Extractor Module files in. We recommend that you choose the same directory you installed the Xceed Zip Compression Library into. The Xceed Zip Self-Extractor Modules setup utility will then add new files (and overwrite existing VCL files) in the Controls\, Licenses\ and Sfx\ directories. (See Files In This Library topic for more information on these directories).

Once you have finished running the Self-Extractors setup utility, you must still take one more of the following steps in order to make Xceed Zip recognize you are now using a registered version of the Self-Extractor Module.

If you are using the VBX or the OCX: You must place the XCDZPSFX.LIC file in the same directory as your XCDZPVBX.LIC file or your XCDZPOCX.LIC file, depending on if you are using the VBX or the OCX.

If you are using the Delphi or C++Builder VCL: You must re-install your Xceed Zip VCL. The new VCL (that is registered for using the Self-Extractor Module) is found in the Controls\ directory where your previous, non-Self-Extractor module VCL was located. Install this new VCL into your Delphi or C++Builder environment the same way you installed your previous Xceed Zip VCL.

You will now be able to create self-extracting Zip files that do not display any registration messages.


Xceed Zip Delphi 1.0 installation instructions
Installing the 16-bit VCL in Delphi 1.0

The Xceed Zip Compression Library setup utility will copy all the necessary files to your system, but it will not:

•	Copy the DLL files into the appropriate directory

•	Install the VCL component into your Delphi 1.0 environment

•	Merge the help file to Delphi 1s help system

You will have to do these things yourself. Step-by-step instructions follow.

Placing the DLL files

You must make the 16-bit DLL files (XCDZIP.DLL and XCDUNZIP.DLL) available to your applications. You may choose any of the following methods:

1. Copy the DLLs into your Windows system directory (for example: C:\WINDOWS\SYSTEM).

2. Copy the DLLs into the directory of each application you are developing that uses the Xceed Zip Compression Library.

3. Add the directory of the Xceed Zip Compression Library files to your path.

Adding the component

You will have to add the XceedZip component to the component library before you can use it. To add the component to the library, follow these steps:

1. Start Delphi 1.0.

2. Choose Install Components... from the Options menu.

3. Choose Add to open the Add Module dialog box.

4. In the Add Module dialog box, choose Browse.

5. Select the directory that contains the Xceed Zip Compression Library Delphi 1.0 files, and then select the XCEEDZIP.DCU file.

6. Choose OK to close the browse dialog box.

7. Choose OK to close the Add Module dialog box.

8. Choose OK to close the Install Components dialog box and rebuild the library.

The Xceed page will appear at the end of the current palette. You can move the components to a different page after they have been installed on the palette.

Adding the help keywords

Delphi allows you to integrate any help file into the Delphi environment. To integrate the help file, follow these steps:

1. Start the Help File Installer from the Delphi group (file HELPINST.EXE).

2. Choose Open... from the File menu.

3. Select the Delphi directory, select the BIN directory, and then select the DELPHI.HDX file.

4. Choose Add Keyword File... from the Keywords menu.

5. Select the directory that contains the Xceed Zip Compression Library Help file, and then select the XCEEDZIP.KWF file from the HELP directory.

6. Choose Save from the File menu.

The Xceed Zip Compression Library help file should now be integrated into the Delphi environment.


Xceed Zip Delphi 2.0 installation instructions
Installing the 32-bit VCL in Delphi 2.0

The Xceed Zip Compression Library setup utility will copy all the necessary files to your system, but it will not:

•	Copy the DLL files into the appropriate directory

•	Install the VCL component into your Delphi 2.0 environment

You will have to do these things yourself. Step-by-step instructions follow.

Placing the DLL files

You must make the 32-bit DLL files (XCDZIP32.DLL and XCDUNZ32.DLL) available to your applications. You may choose any of the following methods:

1. Copy the DLLs into your Windows system directory (for example: C:\WINDOWS\SYSTEM), or SYSTEM32 directory under Windows NT.

2. Copy the DLLs into the directory of each application you are developing that uses the Xceed Zip Compression Library.

3. Add the directory of the Xceed Zip Compression Library files to your path.

Adding the component

You will have to add the Xceed Zip component to the component library before you can use it. To add the component to the library, follow these steps:

1. Start Delphi 2.0.

2. Choose Install... from the Component menu.

3. Choose Add to open the Add Module dialog box.

4. In the Add Module dialog box, choose Browse.

5. Select the directory that contains the Xceed Zip Compression Library files, and then select the XCDZIP32.DCU file.

6. Choose OK to close the browse dialog box.

7. Choose OK to close the Add Module dialog box.

8. Choose OK to close the Install Components dialog box and rebuild the library.

The Xceed page will appear at the end of the current palette. You can move the components to a different page after they have been installed on the palette.

Adding the help keywords

Delphi allows you to integrate any help file into the Delphi environment. To integrate the help file, follow these steps:

1. Start the Help File Installer (stored in the Delphi root directory, as HELP\TOOLS\HELPINST.EXE).

2. Choose Open... from the File menu.

3. Select the Delphi directory, select the BIN directory, and then select the DELPHI.HDX file.

4. Choose Add Keyword File... from the Keywords menu.

5. Select the directory that contains the Xceed Zip Compression Library Delphi 2.0 files, and then select the XCEEDZIP.KWF file from the HELP directory.

6. Choose Save from the File menu.

The Xceed Zip Compression Library help file should now be integrated into the Delphi environment.


Xceed Zip Delphi 3.0 installation instructions
Installing the 32-bit VCL in Delphi 3.0

The Xceed Zip Compression Library setup utility will copy all the necessary files to your system, but it will not:

•	Copy the DLL files into the appropriate directory

•	Install the package library containing the VCL into your Delphi 3.0 environment

You will have to do these things yourself. Step-by-step instructions follow.

Placing the DLL files

You must make the 32-bit DLL files (XCDZIP32.DLL and XCDUNZ32.DLL) available to your applications. You may choose any of the following methods:

1. Copy the DLLs into your Windows system directory (for example: C:\WINDOWS\SYSTEM), or SYSTEM32 directory under Windows NT.

2. Copy the DLLs into the directory of each application you are developing that uses the Xceed Zip Compression Library.

3. Add the directory of the Xceed Zip Compression Library files to your path.

Adding the component

You will have to install the Xceed Zip Delphi 3.0 package library in order to make the Xceed Zip VCL available in your component library. To install the package library, follow these steps:

1. Start Delphi 3.0.

2. Choose Install Packages... from the Component menu.

3. In the Project Options dialog, choose the Add… button.

4. In the Add Design Package dialog box, select the directory that contains the Xceed Zip Compression Library Delphi 3.0 files, and then select the XCEEDZIP.DPL file.

5. Choose OPEN, which will close the Add Design Package dialog box and install the package.

6. Choose Environment Options... from the Tools menu.

7. Select the Library tab in the Environment Options dialog.

8. In the Directories section, using the Library Path edit box, add the path of where your XCEEDZIP.DPL and XCDZIPD3.DCU files are located. Path elements are separated by a semicolon (";") character.

9. Choose OK to close the Environment Options dialog box.

The Xceed page will appear at the end of the current component palette. You can move the components to a different page after they have been installed on the palette.


Xceed Zip Delphi 4.0 installation instructions
Installing the 32-bit VCL in Delphi 4.0

The Xceed Zip Compression Library setup utility will copy all the necessary files to your system, but it will not:

•	Copy the DLL files into the appropriate directory

•	Install the package library containing the VCL into your Delphi 4.0 environment

You will have to do these things yourself. Step-by-step instructions follow.

Placing the DLL files

You must make the 32-bit DLL files (XCDZIP32.DLL and XCDUNZ32.DLL) available to your applications. You may choose any of the following methods:

1. Copy the DLLs into your Windows system directory (for example: C:\WINDOWS\SYSTEM), or SYSTEM32 directory under Windows NT.

2. Copy the DLLs into the directory of each application you are developing that uses the Xceed Zip Compression Library.

3. Add the directory of the Xceed Zip Compression Library files to your path.

Adding the component

You will have to install the Xceed Zip Delphi 4.0 package library in order to make the Xceed Zip VCL available in your component library. To install the package library, follow these steps:

1. Start Delphi 4.0.

2. Choose Install Packages... from the Component menu.

3. In the Project Options dialog, choose the Add… button.

4. In the Add Design Package dialog box, select the directory that contains the Xceed Zip Compression Library Delphi 4.0 files, and then select the XCEEDZIP.BPL file.

5. Choose OPEN, which will close the Add Design Package dialog box and install the package.

6. Click the OK button to close the Project Options dialog.

7. Choose Environment Options... from the Tools menu.

8. Select the Library tab in the Environment Options dialog.

9. In the Directories section, using the Library Path edit box, add the path of where your XCEEDZIP.BPL and XCDZIPD4.DCU files are located. Path elements are separated by a semicolon (";") character.

10. Choose OK to close the Environment Options dialog box.

The Xceed page will appear at the end of the current component palette. You can move the components to a different page after they have been installed on the palette.


Xceed Zip C++Builder 1.0 installation instructions
Installing the 32-bit VCL in C++Builder 1.0

The Xceed Zip Compression Library setup utility will copy all the necessary files to your system, but it will not:

•	Copy the DLL files into the appropriate directory

•	Install the VCL in your C++Builder 1.0 environment

•	Make the .HPP available in your path

You will have to do these things yourself. Step-by-step instructions follow.

Placing the DLL files

You must make the 32-bit DLL files (XCDZIP32.DLL and XCDUNZ32.DLL) available to your applications. You may choose any of the following methods:

1. Copy the DLLs into your Windows system directory (for example: C:\WINDOWS\SYSTEM), or SYSTEM32 directory under Windows NT.

2. Copy the DLLs into the directory of each application you are developing that uses the Xceed Zip Compression Library.

3. Add the directory of the Xceed Zip Compression Library files to your path.

Adding the component

You will have to install the Xceed Zip C++Builder 1.0 component in order to make the Xceed Zip VCL available in your component library. To install the component, follow these steps:

1. Start C++Builder 1.0.

2. Choose Install... from the Component menu.

3. In the Install components dialog, choose the Add… button.

4. In the Add Module dialog box, select Browse button.

5. Select files of type Object File (*.obj).

6. Find and select the XCDZIPC1.OBJ file, then click on the OK button.

The Xceed page will appear at the end of the current component palette. You can move the components to a different page after they have been installed on the palette.


Xceed Zip C++Builder 3.0 installation instructions
Installing the 32-bit VCL in C++Builder 3.0

The Xceed Zip Compression Library setup utility will copy all the necessary files to your system, but it will not:

•	Copy the DLL files into the appropriate directory

•	Install the package library containing the VCL into your C++Builder 3.0 environment

•	Make the .HPP available in your path

You will have to do these things yourself. Step-by-step instructions follow.

Placing the DLL files

You must make the 32-bit DLL files (XCDZIP32.DLL and XCDUNZ32.DLL) available to your applications. You may choose any of the following methods:

1. Copy the DLLs into your Windows system directory (for example: C:\WINDOWS\SYSTEM), or SYSTEM32 directory under Windows NT.

2. Copy the DLLs into the directory of each application you are developing that uses the Xceed Zip Compression Library.

3. Add the directory of the Xceed Zip Compression Library files to your path.

Adding the component

You will have to install the Xceed Zip C++Builder 3.0 package library in order to make the Xceed Zip VCL available in your component library. To install the package library, follow these steps:

1. Start C++Builder 3.0.

2. Choose Install Packages... from the Component menu.

3. In the Project Options dialog, choose the Add… button.

4. In the Add Design Package dialog box, select the directory that contains the Xceed Zip Compression Library C++Builder 3.0 files, and then select the XCEEDZIP.BPL file.

5. Choose OPEN, which will close the Add Design Package dialog box and install the package.

6. Click the OK button to close the Project Options dialog.

7. Choose Environment Options... from the Tools menu.

8. Select the Library tab in the Environment Options dialog.

9. In the Directories section, using the Library Path edit box, add the path of where your XCEEDZIP.BPL and XCDZIPC3.OBJ files are located. Path elements are separated by a semicolon (";") character.

10. Choose OK to close the Environment Options dialog box.

The Xceed page will appear at the end of the current component palette. You can move the components to a different page after they have been installed on the palette.


Xceed Zip VB 3.0 installation instructions
Installing the 16-bit VBX in VB 3.0

The Xceed Zip Compression Library setup utility will copy all the necessary files to your system, but it will not:

•	Copy the DLL files into the appropriate directory

•	Copy the VBX file into the appropriate directory

•	Copy the XCDZPVBX.LIC file into the appropriate directory (registered users only)

•	Add the Xceed Zip control to your VB 3.0 environment

You will have to do these things yourself. Step-by-step instructions follow.

Placing the DLL files

You must make the DLL files (XCDZIP.DLL and XCDUNZIP.DLL) available to your applications. You may choose any of the following methods:

1. Copy the DLLs into your Windows system directory (C:\WINDOWS\SYSTEM).

2. Copy the DLLs into the directory of each application you are developing that uses the Xceed Zip Compression Library.

3. Add the directory of the Xceed Zip Compression Library files to your path.

Placing the VBX file

You must make the VBX file (XCEEDZIP.VBX) available to your applications. You may choose any of the following methods:

1. Copy the VBX into your Windows system directory (C:\WINDOWS\SYSTEM).

2. Copy the VBX into the directory of each application you are developing that uses the Xceed Zip Compression Library.

3. Add the complete path and filename of the VBX to your Visual Basic AUTOLOAD.MAK file. If you do this, you can skip steps 1 to 3 below, because the control will automatically be added to your toolbox the next time you load Visual Basic 3.0.

Placing the XCDZPVBX.LIC file (licensed users only)

You must place the XCDZPVBX.LIC file in your WINDOWS directory (not the WINDOWS\SYSTEM directory!). This file must be present when you begin the compiling or .EXE building process, otherwise you will not have an application registered to use Xceed Zip.

Adding the control

You will have to add the Xceed Zip control to the Visual Basic 3.0 toolbox before you can use it. To add the control to the VB 3.0 toolbox, follow these steps:

1. Start Visual Basic.

2. Open a project by selecting Open Project from the File menu.

3. Select Add File from the File menu.

4. Choose the XCEEDZIP.VBX file from the directory where you installed it.

You can also add the global declarations file XCDTYPES.BAS to your project by following the next two steps:

5. Select Add File from the File menu.

6. Choose the XCDTYPES.BAS file from the controls\vbx directory.


Xceed Zip VB 4.0/16-bit installation instructions
Installing the 16-bit VBX in VB 4.0/16-bit

The Xceed Zip Compression Library setup utility will copy all the necessary files to your system, but it will not:

•	Copy the DLL files into the appropriate directory

•	Copy the VBX file into the appropriate directory

•	Copy the XCDZPVBX.LIC file into the appropriate directory

•	Add the Xceed Zip control to your VB 4.0/16-bit environment

You will have to do these things yourself. Step-by-step instructions follow.

Placing the DLL files

You must make the DLL files (XCDZIP.DLL and XCDUNZIP.DLL) available to your applications. You may choose any of the following methods:

1. Copy the DLLs into your Windows system directory (C:\WINDOWS\SYSTEM).

2. Copy the DLLs into the directory of each application you are developing that uses the Xceed Zip Compression Library.

3. Add the directory of the Xceed Zip Compression Library files to your path.

Placing the VBX file

You must make the VBX file (XCEEDZIP.VBX) available to your applications. You may choose any of the following methods:

1. Copy the VBX into your Windows system directory (C:\WINDOWS\SYSTEM).

2. Copy the VBX into the directory of each application you are developing that uses the Xceed Zip Compression Library.

3. Load the AUTO16LD.VBP project file from your root VB 4.0/16-bit directory, follow the instructions below for Adding the control and then save the project. The control will then be in your toolbar whenever you create a new project or load VB 4.0/16-bit.

Placing the XCDZPVBX.LIC file (licensed users only)

You must place the XCDZPVBX.LIC file in your WINDOWS directory (not the WINDOWS\SYSTEM directory!). This file must be present when you begin the compiling or .EXE building process, otherwise you will not have an application registered to use Xceed Zip.

Adding the control

You will have to add the Xceed Zip control to the Visual Basic 4.0 toolbox before you can use it. To add the control to the VB 4.0 toolbox, follow these steps:

1. Start Visual Basic.

2. Select Custom Controls… from the Tools menu.

3. Select the Browse… button.

4. Choose the XCEEDZIP.VBX file from the directory where you installed it and click on OK.

5. Make sure there is a checkmark next to the XCEEDZIP.VBX entry in the Available Controls list in the Custom Controls dialog then hit OK.

You can also add the global declarations file XCDTYPES.BAS to your project by following the next two steps:

5. Select Add File from the File menu.

6. Choose the XCDTYPES.BAS file from the controls\vbx directory.


Xceed Zip VB 4.0/32-bit installation instructions
Installing the 32-bit OCX in VB 4.0/32-bit

The Xceed Zip Compression Library setup utility will copy all the necessary files to your system, but it will not:

•	Copy the XCDZIP35.OCX and XCDZPOCX.LIC files into the appropriate directories

•	Register the OCX with the operating system

•	Add the Xceed Zip control to your VB 4.0/32-bit environment

You will have to do these things yourself. Step-by-step instructions follow.

Placing the OCX file

You can place the XCDZIP35.OCX file anywhere on your system, but we recommend placing it in the WINDOWS\SYSTEM32 directory.

Placing the XCDZPOCX.LIC file (licensed users only)

You must place the XCDZPOCX.LIC file in the same directory where you placed the XCDZIP35.OCX file. This file must be present when you begin the compiling or .EXE building process, otherwise you will not have an application registered to use Xceed Zip.

Registering and adding the OCX file to your toolbox

In order to make the Xceed Zip OCX available for use by any 32-bit development language, it must be successfully "registered" on your system. In VB 4.0, you must also mark which OCX files you want available in your toolbox. To register the Xceed Zip OCX using VB 4.0, follow these steps:

1. Start the 32-bit Visual Basic 4.0.

2. Select Custom Controls... from the Tools menu.

3. In the Show box, select the Controls checkbox.

4. Select the Browse... button.

5. Find and select the XCDZIP35.OCX file, then click on the OK button.

6. The control should now appear in the listing of "available controls" in the Custom Controls dialog.

7. Now, to make the control available in your toolbox, make sure the checkbox next to the "XceedZip ActiveX Control" entry is selected. Click on the OK button and the Xceed Zip icon should now appear in your toolbox.


Xceed Zip VB 5.0 installation instructions
Installing the 32-bit OCX in VB 5.0

The Xceed Zip Compression Library setup utility will copy all the necessary files to your system, but it will not:

•	Copy the XCDZIP35.OCX and XCDZPOCX.LIC files into the appropriate directories

•	Register the OCX with the operating system

•	Add the Xceed Zip control to your VB 5.0 environment

You will have to do these things yourself. Step-by-step instructions follow.

Placing the OCX file

You can place the XCDZIP35.OCX file anywhere on your system, but we recommend placing it in the WINDOWS\SYSTEM32 directory.

Placing the XCDZPOCX.LIC file (licensed users only)

You must place the XCDZIPOC.LIC file in the same directory where you placed the XCDZIP35.OCX file. This file must be present when you begin the compiling or .EXE building process, otherwise you will not have an application registered to use Xceed Zip.

Registering and adding the OCX file to your toolbox

In order to make the Xceed Zip OCX available for use by any 32-bit development language, it must be successfully "registered" on your system. In VB 5.0, you must also mark which OCX files you want available in your toolbox. To register the Xceed Zip OCX using VB 5.0, follow these steps:

1. Start Visual Basic 5.0.

2. Create a new project or open an existing one.

3. Select Components… from the Project menu.

4. Click the Browse… button.

5. Find and select the XCDZIP35.OCX file, then click on the Open button. This registers the OCX with your operating system and permits languages like VB 5.0 to use it.

6. In the Components dialog, make sure the "Xceed Zip ActiveX control" entry is checked in the components list. This will make it available for use in your applications.

7. Click the OK button.

The Xceed Zip icon should now appear in the components toolbox.


Xceed Zip Word 97 and Excel 97 installation instructions
Installing the 32-bit OCX in Word 97 and Excel 97

The Xceed Zip Compression Library setup utility will copy all the necessary files to your system, but it will not:

•	Copy the XCDZIP35.OCX and XCDZPOCX.LIC files into the appropriate directories

•	Register the OCX with the operating system

•	Add the Xceed Zip control to your Word 97 or Excel 97 environment

You will have to do these things yourself. Step-by-step instructions follow.

Placing the OCX file

You can place the XCDZIP35.OCX file anywhere on your system, but we recommend placing it in the WINDOWS\SYSTEM32 directory.

Placing the XCDZPOCX.LIC file (licensed users only)

You must place the XCDZPOCX.LIC file in the same directory where you placed the XCDZIP35.OCX file. This file must be present when you save or build your final projects, otherwise you will not have an application registered to use Xceed Zip and will not be able to distribute it. If you get registration warning messages even after you have correctly installed the license file, you may need to force Word or Excel to recognize the presence of the license file by manually changing the contents of one of the Xceed Zip properties and then resaving or rebuilding your project.

Registering and adding the OCX file to your toolbox

In order to make the Xceed Zip OCX available for use by any 32-bit development language, it must be successfully "registered" on your system. To register the Xceed Zip OCX with Word 97 or Excel 97, follow these steps:

1. Start Word 97 or Excel 97.

2. Select the Visual Basic Editor option from the Macro submenu in the Tools menu or use the Alt+F11 shortcut.

3. In the Microsoft Visual Basic window, select the References… option from the Tools Menu.

4. In the References dialog, click the Browse... button.

5. Find and select the XCDZIP35.OCX file, then click on the Open button.

6. The "Xceed Zip Control" entry should now appear in the Available References listing in the References dialog.

7. Make sure the "Xceed Zip Control" entry is checked and then click on the OK button.

8. In the Microsoft Visual Basic window, select the UserForm option from the Insert menu.

9. If the Toolbox window is not visible, select the ToolBox option from the View menu.

10. Select the Additional Controls… option from the Tools menu.

11. In the Additional Controls dialog, make sure the "Xceed Zip Control" is checked in the Available Controls list.

12. Click the OK button.

The Xceed Zip icon should now appear in the components toolbox.


Xceed Zip Access 97 installation instructions
Installing the 32-bit OCX in Access 97

The Xceed Zip Compression Library setup utility will copy all the necessary files to your system, but it will not:

•	Copy the XCDZIP35.OCX and XCDZPOCX.LIC files into the appropriate directories

•	Register the OCX with the operating system and make it available to Access 97

You will have to do these things yourself. Step-by-step instructions follow.

Placing the OCX file

You can place the XCDZIP35.OCX file anywhere on your system, but we recommend placing it in the WINDOWS\SYSTEM32 directory.

Placing the XCDZPOCX.LIC file (licensed users only)

You must place the XCDZPOCX.LIC file in the same directory where you placed the XCDZIP35.OCX file. This file must be present when you save or build your final projects, otherwise you will not have an application registered to use Xceed Zip and will not be able to distribute it. If you get registration warning messages even after you have correctly installed the license file, you may need to force Access to recognize the presence of the license file by manually changing the contents of one of the Xceed Zip properties and then resaving or rebuilding your project.

Registering and adding the OCX file to your toolbox

In order to make the Xceed Zip OCX available for use by any 32-bit development language, it must be successfully "registered" on your system. When registering an OCX control with Access 97, the control is automatically added to the Available Controls list, so you can use it in when designing forms and programming in Access 97. To register the Xceed Zip OCX using Access 97, follow these steps:

1. Start Access 97.

2. Select the ActiveX Controls… option from the Tools menu

3. If the ActiveX Controls dialog, click the Register... button.

4. Find and select the XCDZIP35.OCX file, then click on the Open button.

5. The "Xceed Zip Control" entry should now appear in the Available Controls list of the ActiveX Controls dialog.

6. Click the Close button.

The Xceed Zip control should now be available in the toolbox when designing forms.


Xceed Zip Visual FoxPro 5.0 installation instructions
Installing the 32-bit OCX in Visual FoxPro 5.0

The Xceed Zip Compression Library setup utility will copy all the necessary files to your system, but it will not:

•	Copy the XCDZIP35.OCX and XCDZPOCX.LIC files into the appropriate directories

•	Register the OCX with the operating system

•	Add the Xceed Zip control to your Visual Foxpro 5.0 environment

You will have to do these things yourself. Step-by-step instructions follow.

Special note for Visual FoxPro 5.0: Xceed Zip events will be triggered only if you set Application.AutoYield = .F.. Place this code in the section of your main program where you set up your environment. If you only have a single form in your application that uses Xceed Zip, place Application.AutoYield = .F. in the forms load method, and set it back to the default in the forms destroy method.

Placing the OCX file

You can place the XCDZIP35.OCX file anywhere on your system, but we recommend placing it in the WINDOWS\SYSTEM32 directory.

Placing the XCDZPOCX.LIC file (licensed users only)

You must place the XCDZPOCX.LIC file in the same directory where you placed the XCDZIP35.OCX file. This file must be present when you begin the compiling or .EXE building process, otherwise you will not have an application registered to use Xceed Zip. If you get registration warning messages even after you have correctly installed the license file, you may need to force Access to recognize the presence of the license file by manually changing the contents of one of the Xceed Zip properties and then resaving or rebuilding your project.

Registering and adding the OCX file to the list of available ActiveX controls

In order to make the Xceed Zip OCX available for use by any 32-bit development language, it must be successfully "registered" on your system. In Visual FoxPro 5.0, you must mark which OCX files you want to be available to your applications. To register the Xceed Zip OCX using Visual FoxPro 5.0, follow these steps:

1. Start Visual FoxPro 5.0.

2. Select Options... from the Tools menu.

3. Select the Controls tab.

4. Select the ActiveX controls checkbox.

5. Select the Add... button.

6. Find and select the XCDZIP35.OCX file, then click on the OK button.

7. The control should now appear in the "selected:" listbox (still in the Controls tab of the Options dialog)

8. Now, to make the control available to your Visual Foxpro 5.0 projects, make sure the checkbox next to the Xceed Zip Control entry is selected. Click on the OK button and the Xceed Zip icon should now appear in the list of controls you can insert - for example, when using the OLE Container Object on a form.


Xceed Zip OCX installation instructions for Visual C++ 4.0
Installing the 32-bit OCX in Visual C++ 4.0

The Xceed Zip Compression Library setup utility will copy all the necessary files to your system, but it will not:

•	Copy the XCDZIP35.OCX and XCDZPOCX.LIC files into the appropriate directories

•	Register the OCX with the operating system

•	Create a wrapper class around the OCX so you can use it in your Visual C++ 4.0 applications

You will have to do these things yourself. General instructions follow below.

Placing the OCX file

You can place the XCDZIP35.OCX file anywhere on your system, but we recommend placing it in the WINDOWS\SYSTEM32 directory.

Placing the XCDZPOCX.LIC file (licensed users only)

You must place the XCDZPOCX.LIC file in the same directory where you placed the XCDZIP35.OCX file. This file must be present when you build or compile your project, otherwise you will not have an application registered to use Xceed Zip.

Registering the OCX and making it available for use in your projects

In order to make the Xceed Zip OCX available for use by Visual C++ 4.0 and your applications, it must be successfully "registered" on your system, and a wrapper class must be created for the OCX so if can be used by your MFC-based projects. To register the Xceed Zip OCX using Visual C++ 4.0, and create the wrapper class, follow these steps:

1. Start Visual C++ 4.0 (developer studio)

2. Open your MFC AppWizard application project, or create a new one by selecting the New... menu item from the File menu, and choosing the Project Workspace option. Select MFC AppWizard and follow the Wizards instructions to create the project. Be sure that you select the OLE Controls option for the question What OLE support would you like to include?

3. Select the Component... menu item from the Insert menu.

4. Select the OLE Controls tab in the Component Gallery dialog.

5. Select the Customize... button.

6. Select the OLE Controls category in the Customize Component Gallery dialog.

7. Select the Import... button in the Customize Component Gallery dialog.

8. Find and select the XCDZIP35.OCX file, then click on the OK button.

9. Click the OK button in the Customize Component Gallery dialog.

10. The Xceed Zip Control icon should now appear in the list of controls displayed in the OLE Controls tab in the Component Gallery dialog.

11. Select the Xceed Zip Control icon, then click the Insert button in the Component Gallery dialog to insert the control in your project. The Confirm Classes dialog should appear.

12. Click OK to close the Confirm Classes dialog.

13. Click the Close button to close the Component Gallery dialog.

14. The XCEEDZIP.CPP, XCEEDZIP.H, PICTURE.CPP and PICTURE.H files should now be part of your project. You will now be able to instantiate the Xceed Zip object in your project, and see the Xceed Zip icon available in your Controls toolbar when designing dialog boxes.


Xceed Zip OCX installation instructions for Visual C++ 5.0
Installing the 32-bit OCX in Visual C++ 5.0

The Xceed Zip Compression Library setup utility will copy all the necessary files to your system, but it will not:

•	Copy the XCDZIP35.OCX and XCDZPOCX.LIC files into the appropriate directories

•	Register the OCX with the operating system

•	Create a wrapper class around the OCX so you can use it in your Visual C++ 5.0 applications

You will have to do these things yourself. General instructions follow below.

Placing the OCX file

You can place the XCDZIP35.OCX file anywhere on your system, but we recommend placing it in the WINDOWS\SYSTEM32 directory.

Placing the XCDZPOCX.LIC file (licensed users only)

You must place the XCDZPOCX.LIC file in the same directory where you placed the XCDZIP35.OCX file. This file must be present when you build or compile your project, otherwise you will not have an application registered to use Xceed Zip.

Registering the OCX with the operating system

In order to make the Xceed Zip OCX available for use by Visual C++ 5.0 and other development languages, it must be successfully "registered" on your system. To do this, use the "regsvr32" application, which should be available on any 32-bit Windows operating system with a 32-bit development language installed on it.

From the Run option in the Windows 95 or Windows NT start menu, or from a command prompt, run the following command to register an OCX:

regsvr32 "path and filename of the ocx"

You will then see a message box that either displays "LoadLibrary failed" or displays "LoadLibrary succeeded". If you get the success message, then your OCX is now registered on the machine and is ready for use by applications or in your development environment. If you get the failure message, see the About the OCX topic.

Making the control available for use in your projects

Once the control is registered on the system, a wrapper class must be created for the OCX so if can be used by your MFC-based projects. To create the wrapper class, follow these steps:

1.	Start Microsoft Visual C++ 5.0

2.	Open your MFC AppWizard application project, or create a new one by selecting the New... menu item from the File menu, then selecting the Projects tab and choosing the MFC AppWizard item. Follow the Wizards instructions to create the project. Be sure that you select the ActiveX Controls option for the question What other support would you like to include?

3.	Select the Project menu, then select Components and Controls... item from the Add to project submenu.

4.	In the Components and Controls Gallery dialog, look in the Registered ActiveX Controls folder for the Xceed Zip Control entry, then select it and click on the Insert button.

5.	Select the OK in response to the Insert this component? message box. The Confirm Classes dialog should appear.

6.	Click OK to close the Confirm Classes dialog.

7.	Click the Close button to close the Components and Controls Gallery dialog.

8.	The XCEEDZIP.CPP, XCEEDZIP.H, PICTURE.CPP and PICTURE.H files should now be part of your project. You will now be able to instantiate the Xceed Zip object in your project, and see the Xceed Zip icon available in your Controls toolbar when designing dialog boxes.


Xceed Zip OCX installation instructions for 32-bit languages
Installing the 32-bit OCX in other 32-bit development environments

The Xceed Zip Compression Library setup utility will copy all the necessary files to your system, but it will not:

•	Copy the XCDZIP35.OCX and XCDZPOCX.LIC files into the appropriate directories

•	Register the OCX with the operating system

•	Add the Xceed Zip control to your programming environments list of available controls

You will have to do these things yourself. General instructions follow below.

The Xceed Zip OCX is designed to work with any 32-bit development environment. If you have trouble getting the Xceed Zip OCX to work with your setup, please contact Xceed Software.

Placing the OCX file

You can place the XCDZIP35.OCX file anywhere on your system, but we recommend placing it in the WINDOWS\SYSTEM32 directory.

Placing the XCDZPOCX.LIC file (licensed users only)

You must place the XCDZPOCX.LIC file in the same directory where you placed the XCDZIP35.OCX file. This file must be present when you begin the compiling or .EXE building process, otherwise you will not have an application registered to use Xceed Zip. If you get registration warning messages even after you have correctly installed the license file, you may need to force your development environment to recognize the presence of the license file by manually changing the contents of one of the Xceed Zip properties and then resaving or rebuilding your project.

Registering the OCX and making it available for use in your projects

See your development environment's documentation for instructions on registering OCX files onto your system, and making the OCX available for use in your applications. If you cant find instructions to help you, try manually registering the OCX first, as shown below.

How to manually register the OCX

You can make the presense of an OCX control known to the operating system by using the "regsvr32" application, which should be available on any 32-bit Windows operating system with a 32-bit development language installed on it.

From the Run option in the Windows 95 or Windows NT start menu, or from a command prompt, run the following command to register an OCX:

regsvr32 "path and filename of the ocx"

You will then see a message box that either displays "LoadLibrary failed" or displays "LoadLibrary succeeded". If you get the success message, then your OCX is now registered on the machine and is ready for use by applications or in your development environment. If you get the failure message, see the About the OCX topic.


Xceed Zip Self-Extractor Module Introduction
Self-Extractor Module introduction

Welcome to the Xceed Zip Self-Extractor Module!

The Xceed Zip Self-Extractor Module is an optional module that can be purchased for use with the new Xceed Zip Compression Library v3.x. The Xceed Zip Self-Extractor Module provides support for creating fully customizable 16 and 32-bit self-extracting Windows Zip files. These self-extracting Zip files allow a user to simply "run" the Zip file to extract its contents. The self-extracting Zip files contain all the code necessary to unzip their contents, so no unzipping programs, DLLs or other components are required on the user's machine in order to extract the contents of the Zip file.

How does it work?

The new Xceed Zip Compression Library v3.x lets your Windows applications transform an already existing Zip file into a self-extracting Zip file, or create new self-extracting Zip files. Combine these capabilities with the self-extractor provided by the Xceed Zip Self-Extractor Module, and your Windows applications will be able to fully configure the self-extracting Zip files they create. Your applications can customize the self-extractors title, introduction message, icon, default extract path, text and button captions, and more. You can make it display a readme file and license agreement, run a program after extraction, and even prompt the user for passwords to decrypt files. See the Features topic for a complete list of the capabilities the Self-Extractor Module provides.

The Xceed Zip Self-Extractor Module lets you make 16-bit self-extracting Zip files that will work on all Windows 3.x, Windows 95 and Windows NT operating systems, or you can make 32-bit self-extracting Zip files that support long filenames and will work on Windows 95 and Windows NT operating systems.

The properties used to configure the self-extractor are built-into the Xceed Zip Compression Library components. Users who have purchased a copy of the Xceed Zip Self-Extractor Module are able to set these extra properties and start making self-extracting Zip files as easily as they create regular Zip files. Users who dont own a copy of the Xceed Zip Self-Extractor module can still use the Free trial version. It is automatically included with all registered or free trial versions of the Xceed Zip Compression Library and allows you to use the extra properties to create self-extracting Zip files, but they will be considered trial versions and will inform you of this when they are executed. Go ahead and experiment!


Xceed Zip Self-Extractor Module Features

Major operations

•	Create self-extracting Zip files or transform already existing Zip files into self-extracting Zip files.

•	Select either 16-bit self-extracting Zip files that work on all Windows 3.x, Windows 95 and Windows NT operating systems, or 32-bit self-extracting Zip files that support long filenames and work on Windows 95 and Windows NT.

•	Create self-extracting Zip files that span multiple disks.

•	Customize the self-extractor using properties built into the Xceed Zip Compression Library components, or use configuration files.

Other features

•	Introduction message and dialog box titles are customizable.

•	Display a custom license agreement with configurable accept and refuse buttons. New in v3.1!

•	Customize all other messages, prompts and button captions too.

•	Customize the self-extracting Zip files application icon. New in v3.1!

•	Customizable default extract directory with optional confirmation dialog that allows users to select an alternate extract directory.

•	Display a password dialog box whenever an encrypted file is encountered. The user can enter the decryption password or skip the file if they don't have the password for the file.

•	Create self-extracting Zip files with a built-in decryption password. This prevents users from using unzipping programs to extract the files and therefore forcing users to view your custom introduction, license agreement or warning messages.

•	Create program-groups and insert items into program groups. New in v3.1!

•	Associate filename extensions with applications. New in v3.1!

•	Customizable overwrite behavior.

•	Display a text file after succesfully extracting files.

•	Execute an application or open a document using its associated application after succesfully extracting files. Optional command-line parameters can also be specified. Improved in v3.1!

•	InstallMode feature allows 3rd party install or setup programs (and their data files) to be extracted into a temporary directory, executed, and then deleted upon completion. New in v3.1!

•	Display a detailed status dialog during extraction.

•	Any on-screen messages and dialogs can be shut off for quiet operation.

•	Many customized paths, filenames, strings and prompts are parsed, allowing you to insert strings such as the current directory, windows and windows system directories, the temporary directory, and more. Improved in v3.1!


Xceed Zip Self-Extractor free trial version
Xceed Zip Self-Extractor Module free trial version

The free trial version of the Xceed Zip Self-Extractor Module has everything you need in order to create fully customized 16 and 32-bit self-extracting Zip files. It comes with the free trial version of the Xceed Zip Compression Library, so you get all the documentation and sample applications, making it easy for you to find out if you want the benefits that the Xceed Zip Self-Extractor Module adds to the Xceed Zip Compression Library.

Programs using the free trial version of the Xceed Zip Self-Extractor Module will create self-extracting Zip files that are considered as trial versions. When run, the self-extracting Zip files will display a message notifying you that they are trial versions, and all extracted files will have zero-filled contents. You will still be able to evaluate exactly how the self-extracting files appear and work. You must purchase a registered version of the Xceed Zip Self-Extractor Module and correctly install the license file if you wish to create applications that make self-extracting Zip files without this limitation.

Please see the How to order section for ordering information.


About the Xceed Zip DLLs
About the DLLs

The XCDZIP.DLL, XCDZIP32.DLL, XCDUNZIP.DLL and XCDUNZ32.DLL files are dynamic link libraries designed by Xceed to handle the main tasks of manipulating Zip files. They are used by the 16-bit VBX and the 16 and 32-bit VCLs. The 32-bit OCX is self-contained and does not require any of these DLLs (see the About the OCX topic for additional info).

For a 16-bit application that uses the Xceed Zip VBX or Delphi 1 VCL to function, the XCDZIP.DLL and/or XCDUNZIP.DLL must be available on the user's system. The directories searched to find these DLLs are, in order: the current directory, the Windows directory, the Windows System directory, the directories listed in the PATH environment variable and system directories mapped on the Network, if any. We recommend that you place the DLLs in the user's Windows System directory (Typically C:\WINDOWS\SYSTEM).

When running 16-bit applications that use Xceed Zip on a Windows 3.x machine, the SHARE.EXE application must be running. This program normally executed from the AUTOEXEC.BAT file. If you encounter Read or Write errors with Xceed Zip, it may be because this application was not loaded.

For a 32-bit application that uses the Xceed Zip Delphi 2.0/3.0 VCL or the C++Builder 1.0/3.0 VCL to function, the XCDZIP32.DLL and/or XCDUNZ32.DLL must be available on the user's system. The directories searched to find these DLLs are, in order: the directory from which the application loaded, the current directory, the Windows system directory (named SYSTEM32 under Windows NT),  the 16-bit Windows System directory (Windows NT only), and finally, the directories listed in the PATH environment variable. We recommend that you place the DLLs in the user's Windows System directory (C:\WINDOWS\SYSTEM).

It is possible that you may not need to include both DLLs (XCDZIP.DLL and XCDUNZIP.DLL in a 16-bit application, XCDZIP32.DLL and XCDUNZ32.DLL in a 32-bit application), depending on which Xceed Zip functionality you use. Each Xceed Zip method requires the use of one of the two DLLs. See the 'Applies to' section at the top of the description topic for each method to find out which DLL that particular method uses. If you are only using methods that apply to the 'XCDUNZIP' or 'XCDUNZ32' DLL, then only the XCDUNZIP.DLL or XCDUNZ32.DLL file needs to be present on the system running the application using the Xceed Zip control. If only methods applying to the 'XCDZIP' or 'XCDZIP32' DLL are used in your application, then only the XCDZIP.DLL or XCDZIP32.DLL file needs to be present. Note: The Delphi/C++Builder FileCount and Files properties require the use of the XCDUNZIP.DLL or XCDUNZ32.DLL file.

If an Xceed Zip method is executed and the proper DLL is not available on the user's system, the method will not be executed, and will have a return value of XcdErrorDLLNotFound.

Each of these DLLs can be used by only one application at any given time. If your application executes a method that uses one of these DLLs at the same time that another application is using them, the method will not be executed, and will have a return value of XcdErrorLibInUse. In that case, you must re-execute the method until the DLL is done with its current operation.

A version information resource has been embedded into each DLL. When upgrading your applications, you may refer to this information to insure that the latest DLLs are being installed. To view the version information, check the file properties. With File Manager or Windows Explorer, press ALT-ENTER on a file to get the version information.


About the Xceed Zip OCX
About the OCX

The XCDZIP35.OCX is an MFC 4.0-based 32-bit ActiveX control designed by Xceed to work with any 32-bit development environment and to be fully self-contained. It does not require any of the Xceed DLLs to function, however it does require the standard files necessary for MFC OCXs to work on a target machine. The following files must be present in the target machines Windows System directory for an OCX to register itself properly on the machine:

MFC30.DLL, MFC40.DLL, MSVCRT10.DLL, MSVCRT20.DLL, MSVCRT40.DLL, OLEPRO32.DLL, REGSVR32.EXE

You can get these files on any machine with a fully installed copy of a 32-bit development language such as Visual Basic 4.0/32.

How to manually register the OCX

Typically, applications that use OCX controls are distributed with an install or setup program that will also take care of registering the OCX controls on the machine. The registration process referred to here is not related to licensing, it refers to the process of making the control known to the operating system. If you dont use an install program with this capability built-in, you can register your controls manually. From the Run option in the Windows 95 or Windows NT start menu, or from a command prompt, run the following command to register an OCX:

regsvr32 "path and filename of the ocx"

You will then see a message box that either displays "LoadLibrary failed" or displays "LoadLibrary succeeded". If you get the success message, then your OCX is now registered on the machine and is ready for use by applications or in your development environment. If you get the failure message, and have made sure the DLLs mentioned above are present and that you have specified the correct path and OCX filename in quotes, then refer to the next paragraph for a possible solution.

Registration problems

If you are unable to register an OCX on a target machine, even after following the instructions above, Xceed is aware of only one problem that may prevent proper registration of OCX controls on a machine. There is a version of the MFC40.DLL that will only register OCXs if a companion MSVCIRT.DLL is also available in the Windows System directory of the target machine. You can remedy this by either getting a version of MFC40.DLL from a machine that doesnt have the MSVCIRT.DLL present, or by getting the MSVCIRT.DLL from the machine you got the MFC40.DLL from. Making the companion DLL available may take care of the problem.


About the Self-Extractor Module binaries
About the Xceed Zip Self-Extractor Module binaries

The Xceed Zip Self-Extractor Module provides 16 and 32-bit Windows self-extractor binaries that Xceed Zip can use to create customizable self-extracting Zip files.

The binaries contain all the code necessary to unzip files and display their user interface. No external unzip DLLs, support DLLs, components or applications are required to run self-extracting Zip files that use the Xceed Zip binaries.

The binaries are incorporated into the Zip file at the moment of its creation, or after it has been created (for example, when using the MakeSelfExtracting method). Therefore, these binaries must be distributed with your application, because they need to be found by the Xceed Zip Compression Library in order to make the Zip file self-extracting.

The XCDSFX32.BIN file is the 32-bit binary, which works on all Windows 95 and Windows NT operating systems running on Intel 386-compatible CPUs. It supports long filenames, multiple-disk spanning, encryption passwords for individual files, displaying text files, running another application, and more. (See the features list for details)

The XCDSFX16.BIN file is the 16-bit binary, which works on all flavors of Windows: Windows 3.x, Windows 95 and Windows NT. It is more compact than the 32-bit binary, but does not support long filenames and uses a custom, non-Windows 95 directory browser.


Distributing your applications

16-bit Visual Basic and other applications that use the Xceed Zip VBX

You only need to distribute the XCEEDZIP.VBX, XCDZIP.DLL and/or XCDUNZIP.DLL files with your applications when releasing them. You must not distribute your branded XCZPVBX.LIC file or any other files from the registered version of the Xceed Zip Compression Library. See the Linking and distribution license section for more information.

Users that are creating self-extracting Zip files will also need to distribute the binary to be used by Xceed Zip for creating the self-extracting Zip files. When using the Xceed Zip Self-Extractor Modules binaries, you will thus need to distribute the XCDSFX16.BIN file and/or the XCDSFX32.BIN file.

32-bit Visual Basic and other applications that use the Xceed Zip OCX

You only need to distribute the XCDZIP35.OCX file with your applications when releasing them. You must not distribute your branded XCDZPOCX.LIC file or any other files from the registered version of the Xceed Zip Compression Library. See the Linking and distribution license section for more information. See About the OCX to find out what other files need to be distributed for applications that use OCX controls.

Users that are creating self-extracting Zip files will also need to distribute the binary to be used by Xceed Zip for creating the self-extracting Zip files. When using the Xceed Zip Self-Extractor Modules binaries, you will thus need to distribute the XCDSFX16.BIN file and/or the XCDSFX32.BIN file.

Delphi and C++Builder applications

You only need to distribute the appropriate DLL files with your applications when releasing them. Delphi 4.0 and C++Builder 3.0 users may also need to include the .BPL file. You must not distribute the DCU file or any other files from the registered version of the Xceed Zip Compression Library. See the Linking and distribution license section for more information.

Users that are creating self-extracting Zip files will also need to distribute the binary to be used by Xceed Zip for creating the self-extracting Zip files. When using the Xceed Zip Self-Extractor Modules binaries, you will thus need to distribute the XCDSFX16.BIN file and/or the XCDSFX32.BIN file.


Xceed Zip Compression Library Documentation Version
Xceed Zip Compression Library

Help file revision 3.5.0.0 (Aug. 12, 1998)

© Copyright 1995-1998 Xceed Software Inc.

All rights reserved.


Overview of the Xceed Zip Sample Applications

Xceed has provided you with sample applications for various development environments. The sample applications come in different flavors, depending on the language they were designed for.

The sample applications for Visual Basic, Delphi and C++Builder are designed to demonstrate the use of most major Xceed Zip features in the context of a graphical environment similar to some popular Windows Zip/Unzip utilities. You can modify these sample applications and use them (or parts of them) in your own applications.

•	About the VB, Delphi and C++ Builder sample applications.

•	Using the VB, Delphi and C++Builder sample applications.

The sample application for Visual C++ 4.0 and 5.0 is a more compact version of the above sample applications, but still demonstrates how to use Xceed Zips properties, methods and events.

•	About the Visual C++ 4.0 and 5.0 sample applications.

The sample application for Access 97 is designed to demonstrate the basic Zipping and Unzipping features of the Xceed Zip Compression Library. Examining it can give you a good perspective on how Xceed Zip can be used in Access 97.

•	About the Access 97 sample application.


About the VB/Delphi/C++Builder Sample Applications
About the VB, Delphi and C++Builder sample applications

The sample applications for Visual Basic, Delphi and C++Builder come with fully commented source code for VB (3.0, 4.0/32-bit, 5.0), Delphi (1.0, 2.0, 3.0) and C++Builder (1.0, 3.0). The are included with the compression library.

The source codes complement the examples available in the online help, but in the context of a real application, not specific examples designed exclusively to demonstrate each function. We propose that you dive right into the demo's source code and take a look.

The sample application, called 'Xceed Zip Demo', is a Windows program that allows you to manipulate Zip archives. By looking at the source code, you will find out how to Add, Delete, Extract, Freshen, and test files in a Zip archive using the Xceed Zip Compression Library. You will also see how event handlers are written for different events. Some events ask you whether or not to replace a file, while others inform you of the status of a file being processed or inform you that a file cannot be processed. You will also see an example of a basic error handling routine. Testing an archive, Fixing a corrupted archive, and updating the date of the archive to the date of its most recent file, is also possible in the demo. These are essentially the principal features of the Xceed Zip control. Many more advanced capabilities have been left out of the demo to keep it simple, but there should already be enough material demonstrated for you to understand the basic use of the library.

See Using the VB/Delphi/C++Builder sample applications topic to find how it works.


About the Visual C++ 4.0 and 5.0 sample application

The sample application for Visual C++ 4.0 and 5.0 comes with a project workspace you can load directly into Visual C++ and start examining. It will also compile and run directly, if you have correctly installed the Xceed Zip OCX.

To open the sample application project in Visual C++ 4.0 or 5.0, select Open Workspace from the File menu and load the BASIC.MAK file. Visual C++ 5.0 will ask you if you want to convert the makefile - we recommend that you do.

The sample application demonstrates the following Xceed Zip features:

•	Events: Adding, Extracting, Listing, GlobalStatus, Replace.

•	Methods: Add, Extract, List.

•	Properties: Abort, FilesToProcess, Overwrite, Password, UsePaths, ZipFileName.

Visual C++ programming issues

You can instantiate the component in your applications without putting the Xceed Zip control on a form. To do this, you must:

•	Use previously created XCEEDZIP.CPP, XCEEDZIP.H, PICTURE.CPP and PICTURE.H files. To create these files, see the Installing the 32-bit OCX in Visual C++ 4.0 or 5.0 instructions.

•	Call the CXceedZip::Create method on an instance of CXceedZip.

•	Make sure to give a valid CWnd parent or it wont work.

•	Looking at the CBasicDlg::OnInitDialog method will help.

The sample application uses the BSTR type, which is required when dealing with Xceed Zip events like Adding, Extracting and Listing. A BSTR can be considered a zero terminated wide string (Unicode characters), so you should use %S to format it with the sprintf function, or the Cstring::Format method.


About the Access 97 sample application

The Access 97 application is a straightforward, easy to use application that lets you open an existing Zip file to view its contents as well as add, delete and extract files from it.

By looking at the source code, you will be able to see a real-world example of how to make Xceed Zip work with Access 97.

Using the sample application

To get started, load the XZIPDEMO.MDB file in Access 97. The main form will automatically be opened so you can start using the sample application right away, before looking at the source code.

There are three editable fields available: The first lets you specify the Zip file you will be opening. Use the browse button next to the editable field if you want to do this visually. Once you have specified a Zip file, the sample application will automatically try to list its contents. If something goes wrong, like if you specified an invalid Zip file, you will get an error message box.

Once you have the list of files contained in the Zip file, you can click on the Add button to select some files to be added to the Zip file. A file selector box will pop up to let you select the file(s) to add, and then they will be added and the contents list will be updated.

You can also select files displayed in the listbox and click on the Extract or Delete buttons to perform the corresponding action. To extract files, you must first specify a path in the extract directory editable field so that Xceed Zip knows where to unzip the files to.

Finally, to make the currently open Zip file self-extracting, specify the path and filename of a self-extractor binary (such as one of the binaries included with the Xceed Zip Self-Extractor Module, found in the Sfx subdirectory where you installed the Xceed Zip Compression Library), then click on the Make Sfx button to create a self-extracting Zip file custom made by the Access 97 sample application. Once it is created, the self-extracting Zip file can be found in the same directory where the Zip file it was created from is located.

Viewing the sample application source code

To view the source code, close the sample application window if it is open, select the Forms tab in the project window, click on the Xceed Zip sample application icon, then click on the Design button. To see the code that is executed when the user clicks on the List, Add, Extract, Delete or Make Sfx buttons, right click on one of them and select the Build event… popup menu item. You will then see how you can code of these functions.


Using the VB/Delphi/C++Builder Sample Applications
Using the VB, Delphi and C++Builder sample applications

To try the sample application, load and run the appropriate XZIPDEMO.DPR project into Delphi or the XZIPDEMO.MAK into C++Builder or the XZIPDEMO.MAK / XZIPDEMO.VBP into Visual Basic. The first thing you will see after running the demo is a listbox with 7 columns of information on the files in an archive. Since no archive has been opened yet, the listbox is empty. Open or create a new Zip archive by using the appropriate File menu options. The listbox will then automatically be updated to reflect the contents of the archive. To add, delete and extract files, use the appropriate options in the Edit menu.

The status bar below the main listbox indicates what is currently happening during any archive operation. For example, when adding files, it will display the name of each file as it is being added to the archive. To the right of the status bar is a progress bar that shows you what percentage of the current file has been processed. If you are adding many small files, the bar will flash once for each file. If you are adding a large file, the bar will go from 0% to 100% as the file is being processed.

• Adding files • Extracting files • Deleting files • Updating files • Testing an archive	• Fixing a corrupted archive • Updating an archive's date • Using a temporary archive file • Setting the compression speed • Working with multiple-disk archives


Adding files with the Xceed Zip Demo
Adding files

When you select the 'Add' option from the Edit menu, a dialog box will appear allowing you to select files to add to the currently opened archive. Select any number of files and click on the OK button. The files will then be compressed and added to the archive. You can abort the operation before it is completed by clicking on the little stop sign button at the bottom right-hand corner of the window.


Extracting files with the Xceed Zip Demo
Extracting files

After adding some files to an archive, you can select a few of them from the listbox and extract them by using the 'Extract' option from the Edit menu. A dialog box will appear so that you can specify where the files should be extracted to. If ever a file cannot be extracted, a message box will appear to let you know why. For example, if a file in the archive is corrupted, you will be notified. When extracting, if a file already exists in the directory that you wish to extract to, you will be asked whether or not you wish to replace it with the file being extracted. For simplicity, the demo only allows you to choose to replace the file, to skip it or to abort extracting altogether. The Xceed Zip Compression Library allows you to do more: you can chose to replace the file, to skip it, to rename it, to abort the entire process, to skip the file and all other files being extracted that will replace files already existing, or finally to always replace existing files with those being extracted.


Deleting files with the Xceed Zip Demo
Deleting files

To delete files from a currently opened archive, select the files from the listbox that you want to delete and chose the 'Delete' option from the Edit menu. The files will then be deleted from the archive file. You cannot delete files from a Zip file that spans multiple disks.


Updating files with the Xceed Zip Demo
Updating files

The 'Update' option in the Edit menu allows you to replace files in the current archive with newer or more recent versions of the same files. The update command will compare the dates of the selected files in the archive with the dates of the files on disc. Only files on disc that are newer than those in the archive will be compressed and will replace the older files in the archive. Any selected files that are not already in the archive will also be added. You cannot update files in a Zip file that spans multiple disks.


Testing files with the Xceed Zip Demo
Testing an archive

You can test the integrity of an archive to make sure that all the files in the archive will extract properly. Close the currently opened archive and chose the 'Test' option from the File menu. A dialog box will appear to allow you to select an archive file to test. All the files in the archive file will be tested to verify that they will extract as exact copies of the original files. If any problems occur, you will be notified by a message box. When all the files have been tested, you will be notified of the final results.


Fixing files with the Xceed Zip Demo
Fixing a corrupted archive

If an archive file's data ever becomes corrupted, the demo will alert you with a message box, and it will suggest that you try the 'Fix' option. The 'Fix' option is found in the File menu and offers you two correction levels, and to use it you must close the currently opened archive. The 'Fix' option will try to recover as many files as possible from the archive, and eliminate all the corrupted data. The normal level should always be used first. If the archive is still corrupted you could also try the aggressive level. The 'Fix' option may not work on severely corrupted Zip archives. We strongly suggest to make a backup copy of an archive about to be fixed, because the original archive itself is being modified. You cannot fix Zip files that span multiple disks.


Updating the Zip file date with the Xceed Zip Demo
Updating an archive's date

This option found in the Edit menu will search the currently opened archive to find the file with the most recent date. Then it will change the date of the Zip archive to that date. This feature is useful to insure that the date of the Zip archive accurately reflects how recent its contents are. You cannot update the date of a Zip file that spans multiple disks.


Temporary Zip Files with the Xceed Zip Demo
Using a temporary archive file

When adding files into an existing archive, a temporary file is always used for safety. If something goes wrong when adding a file, such as a system crash or an error, the original archive will be left intact. The demo allows you to turn off the use of a temporary file. Remove the check mark next to the 'Use Temp File' option in the Options menu. This accelerates adding or updating files into an archive, because all the other files in the archive that are not being modified will not have to be copied into the temporary archive file. Turning off the use of the temporary may cause the archive to become corrupted if the system crashes or a severe error occurs while adding files.

With the 16-bit Xceed Zip components and sample applications, this option is ignored when creating Zip files that span multiple disks, because a temporary file is not used.

With the 32-bit Xceed Zip components, we recommend keeping the Use Temp File option on. Using a temporary file when spanning disks greatly speeds up the operation under some 32-bit operating systems.


Compression level in the Xceed Zip Demo
Setting the compression speed

You can regulate how fast the compression is performed on files being added to an archive by selecting 'Best', 'Normal', 'Fastest' or 'Store only' from the Options menu. Choosing 'Fastest' will make the Xceed Zip control compress files faster, but the compressed files will be slightly bigger. Choosing 'Best' will try to compress files as much as possible, at the cost of the time it takes to compress them. 'Normal' is a good compromise between fastest and best. The Xceed Zip Compression Library allows you to select among 10 speeds, including no compression at all. Select 'Store only' if you wish files to be added to the Zip file without any compression at all.


Multi-disk archives with the Xceed Zip Demo
Working with multi-disk archives

In the options menu, select 'Multidisk Mode' to allow the demo to work with zip files that span multiple disks. This is useful if the data you want to compress does not fit on one single disk. When creating Zip files in Multidisk mode, if the current disk becomes full, you will be requested to insert the next disk. Each disk is identified by a number, starting with 1 for the first disk the zip file is created on. When extracting or testing files in a multi-disk archive, before any extracting or testing is done, you are always requested to insert the last disk of the archive set, because the main directory of files contained in the zip file is located on that disk.

When adding files to an archive, it is a good idea to insert newly formatted disks, although it is not necessary. A disk with at least some free space is sufficient. As each disk fills up, you will be requested to insert more. When in multi-disk mode, select 'Clear disks' from the Options menu if you want disks to be cleared automatically before writing the Zip file onto them.

Once a zip file that spans multiple disks has been created, you cannot add any more files to it. Also, the Delete, Fix, Update and UpdateZipDate functions are not supported in this mode.

To test the integrity of a multi-disk archive, close it first, then use the Test option in the File menu. You will be guided to insert the proper disks that the demo requires in order to determine if the archive was correctly created. It is always a good idea to test archives created on diskettes.


Xceed's address, phones and email

You can contact us through any of the following:

	Address:	Xceed Software Inc. 2001 De La Métropole Bureau 705 Longueuil, Québec Canada, J4G 1S9
	Telephone: Fax:	(800) 865-2626 (Orders only) (450) 442-2626 (Technical support) (450) 442-4604
	Email: Web:	zip@xceedsoft.com (General inquiries) support@xceedsoft.com (Technical support)  www.xceedsoft.com


Xceed Zip License, copyright, and disclaimer
License, copyright, and disclaimer

The use of this package indicates your understanding and acceptance of the following terms and conditions. This license shall supersede any verbal, or prior verbal or written, statement or agreement to the contrary. If you do not understand or accept these terms, or your local regulations prohibit "after sale" license agreements or limited disclaimers, you must cease and desist using this product immediately.

Copyright: This product is © Copyright 1995-1998 Xceed Software Inc., all rights reserved. This product is protected by Canadian and United States copyright laws, international treaties and all other applicable national or international laws. This software product and documentation may not, in whole or in part, be copied, photocopied, translated, or reduced to any electronic medium or machine readable form, without prior consent in writing, from Xceed Software Inc. and according to all applicable laws. The sole owner of this product is Xceed Software Inc.

Liability disclaimer: This product and/or license is provided as is, without any representation or warranty of any kind, either express or implied, including without limitation any representations or endorsements regarding the use of, the results of, or performance of the product, its appropriateness, accuracy, reliability, or correctness. The entire risk as to the use of this product is assumed by the user and/or licensee. Xceed Software Inc. does not assume liability for the use of this program beyond the original purchase price of the software. In no event will Xceed Software Inc. be liable for additional direct or indirect damages including any lost profits, lost savings, or other incidental or consequential damages arising from any defects, or the use or inability to use these programs, even if Xceed Software Inc. has been advised of the possibility of such damages.

Restrictions: You may not use, copy, modify, translate, or transfer the programs, documentation, or any copy except as expressly defined in this agreement. You may not attempt to unlock or bypass any "copy-protection" or authentication algorithm utilized by the program. You may not remove or modify any copyright notice, nor the About dialog or the method by which it may be invoked.

Operating license: You have the non-exclusive right to use any enclosed program only by a single person, on a single computer at a time. You may physically transfer the program from one computer to another, provided that the program is used only by a single person, on a single computer at a time. In group projects where multiple persons will use the program, you must purchase an individual license for each member of the group. Use over a "local area network" (within the same locale) is permitted provided that the program is used only by a single person, on a single computer at a time. Use over a "wide area network" (outside the same locale) is strictly prohibited under any and all circumstances.

Linking and distribution license: In order to link and distribute compiled Xceed Zip Compression Library code, including the XCEEDZIP.DCU, XCDZIP32.DCU, XCDZIPD3.DCU, XCDZIPD4.DCU, XCDZIPC1.OBJ, XCDZIPC3.OBJ, XCEEDZIP.VBX, XCDZIP35.OCX, XCDZIP.DLL, XCDZIP32.DLL, XCDUNZIP.DLL, XCDUNZ32.DLL, XCDSFX16.BIN and XCDSFX32.BIN files, in accordance to this license, you must be registered with Xceed Software Inc. as an authorized licensee. You may not reproduce or distribute copies of the complete package, any of the source, interface, code (.DCU, .OBJ) units or the license (.LIC) files, any of the documentation, nor may you supply any means by which your users could create, modify, or incorporate the Xceed Zip Compression Library or Xceed Zip Self-Extractor Module in their own products. Violations will be prosecuted to the maximum extent possible under the law.

Back-up and transfer: You may make one copy of the program solely for "back-up" purposes, as prescribed by Canadian, United States, and international copyright laws. You must reproduce and include the copyright notice on the back-up copy. You may transfer the product to another party only if the other party agrees to the terms and conditions of this agreement, and completes and returns registration information (name, address, etc.) to Xceed Software Inc. within 30 days of the transfer. If you transfer the program you must at the same time transfer the documentation and back-up copy, or transfer the documentation and destroy the back-up copy. You may not retain any portion of the program, in any form, under any circumstance.

Terms: This license is effective until terminated. You may terminate it by destroying the program, the documentation and copies thereof. This license will also terminate if you fail to comply with any terms or conditions of this agreement. You agree upon such termination to destroy all copies of the program and of the documentation, or return them to Xceed Software Inc. for disposal.

Other rights and restrictions: All other rights and restrictions not specifically granted in this license are reserved by Xceed Software Inc.


Xceed Zip Acknowledgments
Acknowledgments

Info-Zip

The compression and decompression routines that are used by the Xceed Zip Compression Library to perform the major Zip archive operations, are based on the work by the Info-Zip group. We wish to thank the members of the Info-Zip group for the outstanding contribution that they have provided the software community.

There are no extra charges or costs due to the use of the Info-Zip code, and the original compression sources are freely available on the Internet at http://www.cdrom.com/pub/infozip/Info-Zip.html. We will, upon request, mail you the full Info-Zip sources on a 3.5" MSDOS-format diskette for the cost of the diskette and postage.


Xceed Zip Ordering information
How to order Xceed Zip

To place an order

Contact Xceed Software directly using the (800) 865-2626 order line, fax/mail an Order Form, or use the secure online ordering system at www.xceedsoft.com. See the order form for pricing information.

If you are an established distributor or reseller and you wish to carry Xceed products, please contact us directly.

When ordering, please follow these simple guidelines

•	Print or type clearly. Do not assume we will know what city, state/province, or country you are in. This is especially important for foreign orders, where it is more difficult for us to guess what a city or state might be. For telephone or fax numbers, please include your country code, and/or make sure that the country is spelled out completely. Do not use abbreviations such as UK, DN, FR, etc. It will avoid confusion and greatly accelerate processing your order.

•	We can only accept credit cards, US or Canadian checks, and international bank drafts or money orders. Please do not send EuroChecks or request bank transfers. All checks must be drawn on a US or Canadian bank.

•	If you are sending a check or a bank draft, and this file is more than 6 months old (past December 1998), please make sure that the price has not changed before you order.

•	If you send a bank draft, please do not have the bank send it automatically. You must include an order form with the bank draft.

•	If you order by credit card, please make sure you include all the details, including the card number, the expiration date, and the complete name on the card. Do not send a fax/letter asking us to call you for the card number. Call us directly if you do not want to include the card number on your fax.

•	Although we will always do our utmost to process your order as quickly as possible, it can sometimes take up to 48 hours. Please consider this when you place a rush order.

•	Finally, please note the time before you call and check the time difference between your time zone and ours. We are located in the Eastern standard time zone.

These few guidelines will help assure that everyone will get their order processed quickly and correctly.


Xceed Zip Upgrades
Upgrades

We periodically provide bug fixes and upgrades for our products. Always check our Web site at www.xceedsoft.com for the latest information on the Xceed Zip Compression Library and the Xceed Zip Self-Extractor Module.

Upgrade policy

Minor changes and bug fixes are free; major revisions carry an upgrade fee. If we release a major revision within 60 days of your purchase, and it is identically priced, we will provide the upgrade free of charge. Shipping and handling are always extra. We do not automatically inform you of minor fixes, only major revisions.

Upgrade pricing and purchasing

Purchasing an upgrade entitles you to 1 year's worth of unlimited minor and major upgrades. A year's worth of upgrades for the Xceed Zip Compression Library costs $99 US. A year's worth of upgrades for both the Xceed Zip Self-Extractor Module and the Xceed Zip Compression Library is $149 US for users that own both the Compression Library and the Self-Extractor Module.

The upgrade price applies to upgrades from any previous version of the Xceed Zip Compression Library or Xceed Zip Self-Extractor Module.

All upgrades and discounts must be obtained directly from Xceed Software Inc. See the How to Order topic.

Upgrade prices are subject to change without any prior notice.


Xceed Zip Technical support
Technical support

Before you contact us

In order to save everyone some time, we'd like you to do a few things before you contact us. We know the urge to call is great, but we'd appreciate it if you double check this list:

•	Have you consulted the online manual?

•	Have you used the search feature of the manual?

•	Have you looked at the sample application source?

If you got this far, it must be a tough one. Maybe it's time to tell us about your problem.

How to contact us

The preferred method of contacting us for technical support is on the Internet. You can send any questions or problems to our Internet address: support@xceedsoft.com. Do not leave questions in newsgroups or on CompuServe forums as they probably won't be answered.

We also offer free telephone support on an "as available" basis, Monday through Friday usually from 9 a.m. to 5 p.m. Eastern standard time. Please note the time before you call and check the time difference between your time zone and ours. Sorry, we cannot return international calls.

If you prefer, you can fax us any questions or problems you have. Please allow sufficient time for us to reply, and please do not repeatedly send the same fax. Under no circumstance should you fax or email a copy of your code. We'll ask for it if we need it.

Although there is currently no expiration date on free support, we reserve the right to restrict it to the first 90 days from the time of purchase, without any prior notice.


Xceed Year 2000 compliance statement
Year 2000 compliance statement

All of Xceed Software's active products have been tested and conform to Year 2000 compliance criteria.  Xceed Software products have no inherent dependencies on date/time, and to the best of our knowledge, will not be adversely affected by the internal computer clock setting prior to, during and after January 1, 2000.

All future software upgrades of the products, listed below, shall be placed under the scrutiny of Year 2000 compliance. Software tested includes:

•	Xceed Absolute Packager v1.0

•	Xceed Zip Compression Library v3.0

•	Xceed Self-Extractor Module v1.0

Xceed Software does not provide contractual warranties or guarantees specific to Year 2000 readiness.  Xceed Software product guarantees are set forth in the License Agreement section included in each of our manuals.  We recommend that you read these agreements in order to fully understand your rights.  Any information provided by Xceed Software regarding Year 2000 issues does not constitute an extension of any Xceed Software guarantee.

Please note that the Xceed Zip Compression Library and Xceed Zip Self-Extractor Module are software development tools. We have no control over the ultimate quality or accuracy of products developed using our tools. Therefore, Xceed Software provides no guarantee whatsoever in connection with Year 2000 compliance of any software, application, or operating system developed by third parties using our products.


TXceedZip VCL Overview
	TxceedZip VCL Component
Properties	Methods	Events

Unit

XceedZip, XcdZip32

Description

The TXceedZip component is a powerful compression and decompression tool that is fully compatible with the latest Zip file format. Regular and multi-disk Zip files created by Xceed Zip can be used by PKZip 2.04g, and vice-versa. Xceed Zip does not extract files from zip files created with old versions of PKZip before PKZip 2.0 - those files must be converted to the new format.

Xceed Zip provides a large number of properties, methods and events allowing full-featured manipulation of archive files, real-time progress reports and easy integration with a graphical user interface.

You can set the Zip archive file to work with using the ZipFileName property.

You can obtain the number of files in the archive file from the FileCount property.

To get detailed information on the files contained in the archive file, you can use the List method.

You can add or extract files from the archive file with the Add and Extract, methods. The list of files to add or extract is specified by the value of the FilesToProcess property.

Obtain information on which file is currently being added or extracted using the Adding or Extracting events. The Status event provides a progress report for the current file being added or extracted. The GlobalStatus event provides a progress report for the entire current Add or Extract operation.

There are many more properties, methods and events that you can use to customize Xceed Zips behavior  see the popup boxes available at the top of this page.


Xceed Zip VBX Overview
	Xceed Zip VBX
Properties	Methods	Events

Description

The 16-bit Xceed Zip VBX is a powerful compression and decompression tool that is fully compatible with the latest Zip file format. Regular and multi-disk Zip files created by Xceed Zip can be used by PKZip 2.04g, and vice-versa. Xceed Zip does not extract files from zip files created with old versions of PKZip before PKZip 2.0 - those files must be converted to the new format.

Xceed Zip provides a large number of properties, methods and events allowing full-featured manipulation of archive files, real-time progress reports and easy integration with a graphical user interface.

You can set the Zip archive file to work with using the ZipFileName property.

You can obtain the number of files in the archive file from the FileCount property.

To get detailed information on the files contained in the archive file, you can use the List method.

You can add or extract files from the archive file with the Add and Extract, methods. The list of files to add or extract is specified by using the AddItem method.

Obtain information on which file is currently being added or extracted using the Adding or Extracting events. The Status event provides a progress report for the current file being added or extracted. The GlobalStatus event provides a progress report for the entire current Add or Extract operation.

There are many more properties, methods and events that you can use to customize Xceed Zips behavior  see the popup boxes available at the top of this page.


Xceed Zip OCX Overview
	Xceed Zip OCX
Properties	Methods	Events

Description

The 32-bit Xceed Zip OCX is a powerful compression and decompression tool that is fully compatible with the latest Zip file format. Regular and multi-disk Zip files created by Xceed Zip can be used by PKZip 2.04g, and vice-versa. Xceed Zip does not extract files from zip files created with old versions of PKZip before PKZip 2.0 - those files must be converted to the new format.

Xceed Zip provides a large number of properties, methods and events allowing full-featured manipulation of archive files, real-time progress reports and easy integration with a graphical user interface.

You can set the Zip archive file to work with using the ZipFileName property.

You can obtain the number of files in the archive file from the FileCount property.

To get detailed information on the files contained in the archive file, you can use the List method.

You can add or extract files from the archive file with the Add and Extract, methods. The list of files to add or extract is specified by the value of the FilesToProcess property.

Obtain information on which file is currently being added or extracted using the Adding or Extracting events. The Status event provides a progress report for the current file being added or extracted. The GlobalStatus event provides a progress report for the entire current Add or Extract operation.

There are many more properties, methods and events that you can use to customize Xceed Zips behavior  see the popup boxes available at the top of this page.


	Xceed Zip Self-Extractor Module Overview
Properties	Methods

Description

The Xceed Zip Self-Extractor Module provides you with fully customizable 16 and 32-bit binaries that the Xceed Zip Compression Library can use to create self-extracting Zip files. These self-extracting Zip files are executable Windows programs that can extract their contents without requiring any unzipping applications, components or DLLs.

The self-extracting Zip files you create using Xceed Zip and the Self-Extractor Module can be configured by using configuration files (See the SfxConfig property) or by setting the special properties that Xceed Zip provides for this purpose.

You can create a new Zip file that is self-extracting by setting the SelfExtracting and SfxBinary properties, then using the Xceed Zip Add method to create a new Zip file. To convert an already existing Zip file into a self-extracting Zip file, use the MakeSelfExtracting method instead of the Add method.

You can customize the Self-Extractors introduction message with the SfxMessages property. Customize the self-extractors title with the SfxStrings property. Customize the default extract directory with the SfxExtractDirectory property.

There are many more properties that you can use to customize the way your self-extracting Zip files look and function.  see the popup boxes available at the top of this page.


Xceed Zip Fax Back Order Form
	XCEED SOFTWARE INC. 2001 De La Métropole Bureau 705 Longueuil, Québec Canada  J4G 1S9 Tel: (800) 865-2626 (Orders) Tel: (450) 442-2626 (Tech) Fax: (450) 442-4604	Fax Back Order Form (450) 442-4604
Please fill in the form below and send back for immediate service. Please print clearly.

Please note that your order will be charged in Canadian dollars at the current US dollar exchange rate.

Revision 5350


Xceed Zip Methods

The Xceed Zip control provides the following methods to accomplish the tasks of compressing, uncompressing, and manipulating Zip archive files. Each method's behavior is determined by the values of various properties. The "Applicable properties" section in the documentation for each method lists the properties that are used by that method. When executing a method, it is important to correctly set all properties that are used by that method. Unwanted side effects may occur if properties were altered for the execution of one method, but were not set to the desired values for the next execution of a method that uses those properties.

Delphi and C++Builder Methods • Add • Delete • Extract • Fix • List • MakeSelfExtracting • MemCompress • MemUncompress • MemOriginalSize • StringCompress • StringUncompress • Test • UpdateZipDate	VBX Methods • Add • AddItem • DeleteFiles • Extract • Fix • GetFileInfo • List • MakeSelfExtracting • StringCompress • StringUncompress • Test • UpdateZipDate	OCX Methods • Add • Delete • Extract • Fix • GetFileInfo • List • MakeSelfExtracting • MemCompress • MemUncompress • MemOriginalSize • StringCompress • StringUncompress • Test • UpdateZipDate
Note: Each method (with the exception of the VBX's AddItem and GetFileInfo methods) is a function with a return value that indicates if the operation was successful or if a warning or error has occurred. See the Error codes topic for a list of possible return values for all methods except MemCompress, MemExtract, StringCompress and StringExtract.


Xceed Zip Delphi and C++Builder Methods
VCL and C++Builder Methods

Add Delete Extract Fix List	MakeSelfExtracting MemCompress MemUncompress MemOriginalSize	StringCompress StringUncompress Test UpdateZipDate


Xceed Zip VBX Methods
VBX Methods

Add AddItem DeleteFiles Extract	GetFileInfo Fix List MakeSelfExtracting	StringCompress StringUncompress Test UpdateZipDate


Xceed Zip OCX Methods
OCX Methods

Add DeleteFiles Extract GetFileInfo Fix	List MakeSelfExtracting MemCompress MemUncompress MemOriginalSize	StringCompress StringUncompress Test UpdateZipDate


Xceed Zip self-extractor related methods
Xceed Zip methods associated with creating self-extracting Zip files

Add	MakeSelfExtracting


Xceed Zip Add method
Add Method

Delphi example  C++Builder example  VB 3.0 example  VB 4.0 and 5.0 example

Applies to

All Xceed Zip components, XCDZIP DLL, XCDZIP32 DLL

Applicable properties

Abort, Compression, FilesToProcess (Not with VBX), IncludeDirectoryEntries, IncludeHiddenFiles, IncludeVolumeLabel, ModifiedDate, MoveFiles, MultidiskMode, Password, Recurse, SelfExtracting, StoredExtensions, TempPath, UsePaths, UseTempFile, ZipFileName

Generated events

Adding, GlobalStatus, Newdisk, Rename, PwdQuery, SkippingFile, Status, Updating.

Declarations

Delphi	function Add(Cmd: TXcdCommand): Integer;

C++ Builder	int __fastcall Add(TXcdCommand p0);

VB 3.0	function Add (Cmd As Integer) As Integer

OCX	Integer Add(Integer Cmd)

Description

The Add method adds, updates, or freshens files in an archive, depending on the Cmd parameter, which can be any one of the following values:

Value	Meaning

xecAll (0)	All the listed files are added to the archive, whether they are already present in the archive or not. If a file to be added is already present in the archive, the file inside the archive will be replaced.

xecFreshen (1)	Only the listed files that are more recent than those already in the archive will be replaced. Does not add any new files to the archive.

xecUpdate (2)	Same as xecFreshen, but adds new files to the archive if they are not already there.

The archive file to be operated on must be specified by setting the ZipFileName property. If the archive file does not exist, a new one will be created, except if Cmd = xecFreshen.

When using Delphi or the OCX, the FilesToProcess property must contain the list of files to add, update or freshen. When using the VBX, use the AddItem method to specify this list of files. If Cmd = xecUpdate or Cmd = xecFreshen, the list of files to process may be left empty. In this case, all the files already present in the archive file will be freshened.

The Add method compresses files using the Deflate compression algorithm. It is the same compression algorithm as the one used by PKZip 2.04g.

When the MultidiskMode property is set to True, the add method can only be used with Cmd = xecAll. Furthermore, you can only use the Add method to create an archive that spans multiple disks. Once the multiple-disk archive has been created, you cannot add any more files to it, although you can test, list and extract any files it contains.

Return value

The return value is XcdSuccess if the operation was completed without errors, otherwise it is one of the error codes.


Add method Delphi example
Delphi example

The following code compresses the file c:\test\myfile.dat into the archive file c:\test\mytest.zip. You should check the ResultCodes value once you are done  if it is XcdSuccess, the operation was succesful. Otherwise, look up the error code in the error codes chart to find out why it didnt work.

procedure TForm1.Button1Click(Sender: TObject);

var

  ResultCode: Integer;

begin

  XceedZip1.FilesToProcess.Add('c:\test\myfile.dat');

  XceedZip1.ZipFileName := 'c:\test\mytest.zip';

  ResultCode := XceedZip1.Add(xecAll);

end;


Add method C++Builder example
C++Builder example

The following code compresses the file c:\test\myfile.dat into the archive file c:\test\mytest.zip. You should check the ResultCodes value once you are done  if it is XcdSuccess, the operation was succesful. Otherwise, look up the error code in the error codes chart to find out why it didnt work.

void __fastcall TForm1::Button1Click(TObject *Sender)

{

  int ResultCode;

  XceedZip1->FilesToProcess->Add("c:\\temp\\myfile.dat");

  XceedZip1->ZipFileName = "c:\\test\\mytest.zip";

  ResultCode = XceedZip1->Add(xecAll);

}


Add method VB 3.0 example
VB 3.0 VBX example

The following code compresses the file c:\test\myfile.dat into the archive file c:\test\mytest.zip. You should check the ResultCodes value once you are done  if it is XcdSuccess, the operation was succesful. Otherwise, look up the error code in the error codes chart to find out why it didnt work.

Sub Command1_Click ()

  Dim ResultCode As Integer

  XceedZip1.AddItem "c:\test\myfile.dat"

  XceedZip1.ZipFileName = "c:\test\mytest.zip"

  ResultCode = XceedZip1.Add(xecAll)

End Sub


Add method VB 4.0 and 5.0 example
VB 4.0 and 5.0 OCX example

The following code compresses the file c:\test\myfile.dat into the archive file c:\test\mytest.zip. You should check the ResultCodes value once you are done  if it is XcdSuccess, the operation was succesful. Otherwise, look up the error code in the error codes chart to find out why it didnt work.

Sub Command1_Click()

  Dim ResultCode As Integer

  XceedZip1.FilesToProcess = "c:\test\myfile.dat"

  XceedZip1.ZipFileName = "c:\test\mytest.zip"

  ResultCode = XceedZip1.Add(xecAll)

End Sub


Xceed Zip AddItem method (VB)
AddItem Method

VB 3.0 example

Applies to

Xceed Zip VBX

VB 3.0 declaration

Sub AddItem (Filespec As String)

Description

The AddItem method is used to provide a list of files to be processed by the Add, Delete, Extract, List, and Test methods. For the Add method, the AddItem method is used to specify the list of files to add, update or freshen. For the other methods, the AddItem method is used to specify the list of files already inside the archive file that are to be processed.

There are various ways to specify files with the AddItem method. Filenames may be specified with absolute paths, relative paths or without paths, and wildcards are allowed. For the Add method, If paths are not given, files will be read only from the current directory. If absolute paths are supplied, the entire path, except for the drive letter and  : character, will be stored in the Zip file. If relative paths are supplied, the path stored in the zip file will be relative to the current directory. You can use the CHDIR and CHDRIVE command in VB to change your current directory, and thus control or limit which portions of the path will be stored in the Zip file. For example, to store only the "text\spanish.doc" portion of "c :\client\text\spanish.doc", change directory to "c :\client" and specify your file like this :

XceedZip1.AddItem "text\spanish.gif"

For other methods, the same path and filenames must be given as those stored in the archive, although wildcards can be used.

Each file or wildcard specification is added to the list of files to process by calling the AddItem once for each item. For example, to add all .GIF files from the 'pictures' directory, and all .TXT files from the 'notes' directory, you would call AddItem twice, like this:

XceedZip1.AddItem "c:\pictures\*.gif"

XceedZip1.AddItem "c:\notes\*.txt"

The list of files to process that is specified by the AddItem property is always cleared after the execution of methods that use it, even if an error has occurred.

A special feature of the AddItem method is to allow files to be explicitly excluded or included from the list of files already specified with the AddItem method. To exclude certain files, place a < symbol before the filename or wildcard expression to exclude, and add it to the list of files to process. To include only certain files, place a > symbol before the filename or wildcard expression. The include or exclude feature may only be used if the list of files to process contains at least one filename or wildcard expression without the < or > symbols. For the Extract, List and Test methods, only the exclude feature is allowed.


AddItem method VB 3.0 example
VB 3.0 VBX example

Here is an example of using the AddItem method in conjunction with the Add method, to compress all the files in drive c: ending with .txt, except those files that begin with readme. In this example, we want to preserve the paths along with the filenames, so we set UsePaths to True.

Sub AddItemExample ()

  Dim ResultCode As Integer

  Rem Include the contents of any directories found

  XceedZip1.Recurse = True

  Rem Store the path to each file in the archive

  XceedZip1.UsePaths = True

  Rem Compress all files and directories on drive c:

  XceedZip1.AddItem "c:\*"

  Rem But, include only *.txt files

  XceedZip1.AddItem ">*.txt"

  Rem And exclude any path+filename ending with 'readme.*'

  XceedZip1.AddItem "<*readme.*"

  Rem Specify the archive file to add the files to

  XceedZip1.ZipFileName = "c:\test.zip"

  Rem Start the compression

  ResultCode = XceedZip1.Add(xecAll)

End Sub


Xceed Zip Delete method
Delete (Delphi , C++Builder and OCX) and DeleteFiles (VB) Method

Delphi example  C++Builder example  VB 3.0 example  VB 4.0 and 5.0 example

Applies to

All Xceed Zip components, XCDZIP DLL, XCDZIP32 DLL

Applicable properties

Abort, FilesToProcess (Not with VBX), TempPath, ZipFileName

Generated events

Deleting, SkippingFile.

Declarations

Delphi 	function Delete: Integer;

C++ Builder	int __fastcall Delete(void);

VB 3.0	function DeleteFiles () As Integer

OCX	Integer Delete()

Description

The Delete (Delphi and OCX) and DeleteFiles (VB) methods remove files that are in an archive file. The archive file to be operated on must be specified by setting the ZipFileName property.

When using Delphi or the OCX, the FilesToProcess property must contain the list of files to delete. In VB, use the AddItem method to specify the list of files to delete.

The Delete and DeleteFiles methods cannot be used on archive files created with the MultidiskMode property set to True.

Return value

The return value is XcdSuccess if the operation was completed without errors, otherwise it is one of the error codes.


Delete method Delphi example
Delphi example

The following code deletes all files ending with .txt from the archive file c:\test\mytest.zip.

procedure TForm1.Button1Click(Sender: TObject);

begin

  Dim ResultCode As Integer

  XceedZip1.FilesToProcess.Add('*.txt');

  XceedZip1.ZipFileName := 'c:\test\mytest.zip';

  ResultCode := XceedZip1.Delete;

end;


Delete method C++Builder example
C++Builder example

The following code deletes all files ending with .txt from the archive file c:\test\mytest.zip.

void __fastcall TForm1::Button1Click(TObject *Sender)

{

  int ResultCode;

  XceedZip1->FilesToProcess->Add("*.txt");

  XceedZip1->ZipFileName = "c:\\test\\mytest.zip";

  ResultCode = XceedZip1->Delete();

}


Delete method VB 3.0 example
VB 3.0 VBX example

The following code deletes all files ending with .txt from the archive file c:\test\mytest.zip.

Sub Command1_Click ()

  Dim ResultCode As Integer

  XceedZip1.AddItem "*.txt"

  XceedZip1.ZipFileName = "c:\test\mytest.zip"

  ResultCode = XceedZip1.DeleteFiles

End Sub


Delete method VB 4.0 and 5.0 example
VB 4.0 and 5.0 OCX example

The following code deletes all files ending with .txt from the archive file c:\test\mytest.zip.

Sub Command1_Click()

  Dim ResultCode As Integer

  XceedZip1.FilesToProcess = "*.txt"

  XceedZip1.ZipFileName = "c:\test\mytest.zip"

  ResultCode = XceedZip1.Delete

End Sub


Xceed Zip Extract method
Extract Method

Delphi example  C++Builder example  VB 3.0 example  VB 4.0 and 5.0 example

Applies to

All Xceed Zip components, XCDUNZIP DLL, XCDUNZ32 DLL

Applicable properties

Abort, ExtractDirectory, FilesToProcess (Delphi and OCX), MultidiskMode, Overwrite, Password, UsePaths, ZipFileName

Generated events

Extracting, GlobalStatus, Newdisk, SkippingFile, Status, PwdQuery, Rename, Replace.

Declarations

Delphi 	function Extract(Cmd: TXcdCommand): Integer;

C++ Builder	int __fastcall Extract(TXcdCommand p0);

VB 3.0	function Extract (Cmd As Integer) As Integer

OCX	Integer Extract(Integer Cmd)

Description

The Extract method extracts files from an archive and recreates the original files. There are three modes for extracting files, determined by the Cmd parameter, which can be any one of the following values:

Value	Meaning

xecAll (0)	All the listed files are extracted from the archive, into the destination directory specified by ExtractDirectory.

xecFreshen (1)	Only the listed files to extract from the archive that are more recent than those already existing in the destination directory are extracted. Files that only exist in the archive but not in the destination directory are not extracted.

xecUpdate (2)	Same as xecFreshen, but also extracts files that do not already exist.

The archive file to be extracted from must be specified by setting the ZipFileName property.

When using Delphi or the OCX, the FilesToProcess property may contain the list of files to extract. If the FilesToProcess property is empty, all the files present in the archive file will be extracted. With the VBX, use the AddItem method to specify the list of files to extract.

If a file is about to be extracted, whether it will replace an existing file or not depends on the value of the Overwrite property and, if applicable, the results of an Replace event. For example, if the Overwrite property is set to xowAsk, then whenever a file is to be replaced, an Replace event will occur.

Return value

The return value is XcdSuccess if the operation was completed without errors, otherwise it is one of the error codes.


Extract method Delphi example
Delphi example

The following code extracts the file readme.txt from the archive file c:\test\mytest.zip into the  directory c:\test\info. If the directory does not already exist, it will be created automatically. You should check the ResultCodes value once you are done  if it is XcdSuccess, the operation was succesful. Otherwise, look up the error code in the error codes chart to find out why it didnt work.

procedure TForm1.Button1Click(Sender: TObject);

var

  ResultCode: Integer;

begin

  XceedZip1.FilesToProcess.Add('readme.txt');

  XceedZip1.ExtractDirectory := 'c:\test\info';

  XceedZip1.ZipFileName := 'c:\test\mytest.zip';

  ResultCode := XceedZip1.Extract(xecAll);

end;


Extract method C++Builder example
C++Builder example

The following code extracts the file readme.txt from the archive file c:\test\mytest.zip into the  directory c:\test\info. If the directory does not already exist, it will be created automatically. You should check the ResultCodes value once you are done  if it is XcdSuccess, the operation was succesful. Otherwise, look up the error code in the error codes chart to find out why it didnt work.

void __fastcall TForm1::Button1Click(TObject *Sender)

{

  int ResultCode;

  XceedZip1->FilesToProcess->Add("Readme.txt");

  XceedZip1->ExtractDirectory = "c:\\test\\info";

  XceedZip1->ZipFileName = "c:\\test\\mytest.zip";

  ResultCode = XceedZip1->Extract(xecAll);

}


Extract method VB 3.0 example
VB 3.0 VBX example

The following code extracts the file readme.txt from the archive file c:\test\mytest.zip into the  directory c:\test\info. If the directory does not already exist, it will be created automatically. You should check the ResultCodes value once you are done  if it is XcdSuccess, the operation was succesful. Otherwise, look up the error code in the error codes chart to find out why it didnt work.

Sub Command1_Click ()

  Dim ResultCode As Integer

  XceedZip1.AddItem "readme.txt"

  XceedZip1.ExtractDirectory = "c:\test\info"

  XceedZip1.ZipFileName = "c:\test\mytest.zip"

  ResultCode = XceedZip1.Extract(xecAll)

End Sub


Extract method VB 4.0 and 5.0 example
VB 4.0 and 5.0 OCX example

The following code extracts the file readme.txt from the archive file c:\test\mytest.zip into the  directory c:\test\info. If the directory does not already exist, it will be created automatically. You should check the ResultCodes value once you are done  if it is XcdSuccess, the operation was succesful. Otherwise, look up the error code in the error codes chart to find out why it didnt work.

Sub Command1_Click()

  Dim ResultCode As Integer

  XceedZip1.FilesToProcess = "readme.txt"

  XceedZip1.ExtractDirectory = "c:\test\info"

  XceedZip1.ZipFileName = "c:\test\mytest.zip"

  ResultCode = XceedZip1.Extract(xecAll)

End Sub


Xceed Zip Fix method
Fix Method

Delphi example  C++Builder example  VB 3.0 example  VB 4.0 and 5.0 example

Applies to

All Xceed Zip components, XCDZIP DLL, XCDZIP32 DLL

Applicable properties

Abort, ZipFileName

Generated events

Fixing, SkippingFile.

Declarations

Delphi 	function Fix(Aggressive: Boolean): Integer;

C++ Builder	int __fastcall Fix(bool p0);

VB 3.0	function Fix (Aggressive As Integer) As Integer

OCX	Integer Fix(Boolean Aggressive)

Description

The Fix method attempts to repair an archive with missing or corrupted portions. It is not guaranteed to work, so you must make a backup copy of the archive file before executing the Fix method. Always set the Aggressive parameter to False, and if the return value does not indicate XcdSuccess, then try it again with the Aggressive parameter set to True. Aggressive = False is much more reliable if the archive is lightly or not damaged, for example when it has only been truncated.

Fix will not recover archives that were transferred by modem in ASCII mode instead of binary.

The archive file to be fixed must be specified by setting the ZipFileName property.

After the repair, if the Test method is applied to the fixed archive, it may report that some files have a bad CRC. Such files cannot be recovered; you can remove them from the archive using the Delete method.

The Fix method cannot be used when the MultidiskMode property is set to True.

Return value

The return value is XcdSuccess if the operation was completed without errors, otherwise it is one of the error codes.


Fix method Delphi example
Delphi example

The following code calls the fix method (non-aggressive mode) to repair the c:\test\mytest.zip archive file.

procedure TForm1.Button1Click(Sender: TObject);

var

  ResultCode: Integer;

begin

  XceedZip1.ZipFileName := 'c:\test\mytest.zip';

  ResultCode := XceedZip1.Fix(False);

end;


Fix method C++Builder example
C++Builder example

The following code calls the fix method (non-aggressive mode) to repair the c:\test\mytest.zip archive file.

void __fastcall TForm1::Button1Click(TObject *Sender)

{

  int ResultCode;

  XceedZip1->ZipFileName = "c:\\test\\mytest.zip";

  ResultCode = XceedZip1->Fix(False);

}


Fix method VB 3.0 example
VB 3.0 VBX example

The following code calls the fix method (non-aggressive mode) to repair the c:\test\mytest.zip archive file.

Sub Command1_Click ()

  Dim ResultCode As Integer

  XceedZip1.ZipFileName = "c:\test\mytest.zip"

  ResultCode = XceedZip1.Fix(False)

End Sub


Fix method VB 4.0 and 5.0 example
VB 4.0 and 5.0 OCX example

The following code calls the fix method (non-aggressive mode) to repair the c:\test\mytest.zip archive file.

Sub Command1_Click()

  Dim ResultCode As Integer

  XceedZip1.ZipFileName = "c:\test\mytest.zip"

  ResultCode = XceedZip1.Fix(False)

End Sub


Xceed Zip GetFileInfo method (VB)
GetFileInfo Method

VB 3.0 example  VB 4.0 and 5.0 example

Applies to

Xceed Zip VBX, Xceed Zip OCX, XCDUNZIP DLL

Declarations

VB 3.0 	function GetFileInfo (Index As Integer) As Integer

OCX	Integer GetFileInfo(Integer Index)

Description

The GetFileInfo method lets you access information on a specific file in the archive, by index number. The index number can be a number ranging from 0, the first file in the archive, up to the number of files in the archive minus 1. The value of the FileCount property provides the number of files in the archive. The information on the file is provided by the Listing event that is generated in response to calling the GetFileInfo method

The archive file must be specified by setting the ZipFileName property.

The GetFileInfo method particularly useful in order to avoid keeping all the information for each file in memory at the same time. However, using the List method to obtain information on batches of files in an archive is much faster, since the GetFileInfo method will sequentially search the contents of an archive file every time it is used.


Xceed Zip List method
List Method

Delphi example  C++Builder example  VB 3.0 example  VB 4.0 and 5.0 example

Applies to

All Xceed Zip components, XCDUNZIP DLL, XCDUNZ32 DLL

Applicable properties

Abort, FilesToProcess (Delphi and OCX) , MultidiskMode, ZipFileName

Generated events

Listing

Declarations

Delphi	function List: Integer;

C++ Builder	int __fastcall List(void);

VB 3.0	function List () As Integer

OCX	Integer List()

Description

The List method lists and provides information about files in an archive. The list method can be used for purposes such as building a list of files that are contained in the archive, or to obtain detailed information on all or some of files in the archive.

The archive file to be listed must be specified by setting the ZipFileName property.

With Delphi or the OCX, the FilesToProcess property may contain the list of files to list. If the FilesToProcess property is empty, all the files present in the archive file will be listed. With the VBX, use the AddItem method to specify files to list. Wildcards can be used to limit the listing to certain files, for example .TXT files in an archive.

To find out how many files are in the archive before executing the List method, use the FileCount property. To get information on a single file by index, use the Files property.

The actual information for each file is obtained when the Listing event occurs. The Listing event will occur once for every file listed. A handler must be written for the Listing event in order to obtain the file's information.

Return value

The return value is XcdSuccess if the operation was completed without errors, otherwise it is one of the error codes.


List method Delphi example
Delphi example

The first procedure of the following code lists all the files in the archive c:\test\mytest.zip that finish with .txt. For each file listed, an Listing event will occur. The second function below is a handler written for the Listing event that displays some of the available information on each file in a listbox.

This example uses a button, a listbox and a Xceed Zip control on a form. Before trying out this code, make sure you have assigned the handler for the Listing event.

procedure TForm1.Button1Click(Sender: TObject);

begin

  XceedZip1.FilesToProcess.Add('*.txt');

  XceedZip1.ZipFileName := 'c:\test\mytest.zip';

  if (XceedZip1.List >= XcdFirstError) then

    Listbox1.Items.Add('An error occurred.');

end;

procedure TForm1.XceedZip1Listing(XceedZip: TXceedZip;

  const FileStats: TXcdFileStats);

begin

  ListBox1.Items.Add('Filename: ' + FileStats.Name);

  ListBox1.Items.Add('Uncompressed size: ' +

    IntToStr(FileStats.Size));

  ListBox1.Items.Add('Compressed size: ' +

    IntToStr(FileStats.PackedSize));

end;


List method C++Builder example
C++Builder example

The first procedure of the following code lists all the files in the archive c:\test\mytest.zip that finish with .txt. For each file listed, an Listing event will occur. The second function below is a handler written for the Listing event that displays some of the available information on each file in a listbox.

This example uses a button, a listbox and a Xceed Zip control on a form. Before trying out this code, make sure you have assigned the handler for the Listing event.

void __fastcall TForm1::Button1Click(TObject *Sender)

{

  XceedZip1->FilesToProcess->Add("*.txt");

  XceedZip1->ZipFileName = "c:\\test\\mytest.zip";

  if (XceedZip1->List() >= XcdFirstError)

    ListBox1->Items->Add("An error occurred.");

}

void __fastcall TForm1::XceedZip1Listing(TXceedZip *XceedZip, const TXcdFileStats &FileStats)

{

  ListBox1->Items->Add("Filename: " + FileStats.Name);

  ->Items->Add("Uncompressed size: " +

    IntToStr(FileStats.Size));

  ->Items->Add("Compressed size: " +

    IntToStr(FileStats.PackedSize));

}


List method VB 3.0 example
VB 3.0 VBX example

The first procedure of the following code lists all the files in the archive c:\test\mytest.zip that finish with .txt. For each file listed, an Listing event will occur. The second function below is a handler written for the Listing event that displays some of the available information on each file in a listbox.

This example uses a button named Command1, a listbox named List1 and an Xceed Zip control named XceedZip1 on a form.

Sub Command1_Click ()

  Dim ResultCode As Integer

  XceedZip1.AddItem "*.txt"

  XceedZip1.ZipFileName = "c:\test\mytest.zip"

  ResultCode = XceedZip1.List

  If (ResultCode >= XcdFirstError) Then

    List1.AddItem "An error occurred."

  End If

End Sub

Sub XceedZip1_OnListing (Filename$, Size As Long, PSize As Long, Processed As Long, Attr As Integer, FTime$, CRC As Long, Ratio As Integer, Completion As Integer, Method As Integer, Encrypted As Integer)

  List1.AddItem "Filename: " + FileName$

  List1.AddItem "Uncompressed size: " + Trim$(Str$(Size))

  List1.AddItem "Compressed size: " + Trim$(Str$(PSize))

End Sub


List method VB 4.0 and 5.0 example
VB 4.0 and 5.0 OCX example

The first procedure of the following code lists all the files in the archive c:\test\mytest.zip that finish with .txt. For each file listed, an Listing event will occur. The second function below is a handler written for the Listing event that displays some of the available information on each file in a listbox.

This example uses a button named Command1, a listbox named List1 and an Xceed Zip control named XceedZip1 on a form.

Sub Command1_Click()

  Dim ResultCode As Integer

  XceedZip1.FilesToProcess = "*.txt"

  XceedZip1.ZipFileName = "c:\test\mytest.zip"

  ResultCode = XceedZip1.List

  If (ResultCode >= XcdFirstError) Then

    List1.AddItem "An error occurred."

  End If

End Sub

Sub XceedZip1_Listing(FileName As String, ByVal Size As Long, ByVal PSize As Long, ByVal Processed As Long, ByVal Attr As Integer, FTime As String, ByVal CRC As Long, ByVal Ratio As Integer, ByVal Completion As Integer, ByVal Method As Integer, ByVal Encrypted As Integer, ByVal ComLen As Integer, Comment As String)

  List1.AddItem "Filename: " + FileName$

  List1.AddItem "Uncompressed size: " + Str$(Size)

  List1.AddItem "Compressed size: " + Str$(PSize)

End Sub


Xceed Zip MakeSelfExtracting method
MakeSelfExtracting Method

Delphi example  C++Builder example  VB 3.0 example  VB 4.0 and 5.0 example

Applies to

All Xceed Zip components, XCDZIP DLL, XCDZIP32 DLL

Applicable properties

Abort, ZipFileName

Generated events

GlobalStatus

Delphi declaration

Delphi	function MakeSelfExtracting: Integer;

C++ Builder	int __fastcall MakeSelfExtracting(void);

VB 3.0	function MakeSelfExtracting () As Integer

OCX	Integer MakeSelfExtracting()

Description

The MakeSelfExtracting method converts an existing Zip file into a self-extracting Zip file. Use this method only if you are trying to convert an already existing Zip file into a self-extracting Zip file. If you are creating the Zip file yourself (using the Add method), use the SelfExtracting property to make Xceed Zip create a self-extracting Zip file instead of a regular Zip file.

The archive file to be operated on must be specified by setting the ZipFileName property. If the archive file does not exist, the operation will return the XcdErrorNoZipFile error code.

To create a self-extracting Zip file, a binary must be supplied. Specify the path and filename of the binary to use in the SfxBinary property.

The self-extracting Zip file will be created in the same directory where the Zip file specified in the ZipFileName property is located, and will have a .EXE extension. You cannot specify a filename to convert that already has a .EXE extension. The original Zip file is not modified.

A number of properties are provided specifically to allow customizing self-extracting Zip files produced with binaries from the Xceed Zip Self-Extractor Module. You can also use a configuration file (See the SfxConfigFile property) instead of, or in conjunction with these properties.

Return Value

The return value is XcdSuccess if the operation was completed without errors, otherwise it is one of the error codes.


MakeSelfExtracting method Delphi example
Delphi example

The following code converts the file c:\test\regular.zip into a self extracting Zip file c:\test\regular.exe. You should check the ResultCodes value once you are done  if it is XcdSuccess, the operation was succesful. Otherwise, look up the error code in the error codes chart to find out why it didnt work.

procedure TForm1.Button1Click(Sender: TObject);

var

  ResultCode: Integer;

begin

  XceedZip1.ZipFileName := 'c:\test\mytest.zip';

  XceedZip1.SfxBinary := 'c:\myapp\xcdsfx16.bin';

  ResultCode := XceedZip1.MakeSelfExtracting;

end;


MakeSelfExtracting method C++Builder example
C++Builder example

The following code converts the file c:\test\regular.zip into a self extracting Zip file c:\test\regular.exe. You should check the ResultCodes value once you are done  if it is XcdSuccess, the operation was succesful. Otherwise, look up the error code in the error codes chart to find out why it didnt work.

void __fastcall TForm1::Button1Click(TObject *Sender)

{

  int ResultCode;

  XceedZip1->ZipFileName = "c:\\test\\mytest.zip";

  XceedZip1->SfxBinary = "c:\\myapp\\xcdsfx16.bin";

  ResultCode = XceedZip1->MakeSelfExtracting();

}


MakeSelfExtracting method VB 3.0 example
VB 3.0 VBX example

The following code converts the file c:\test\regular.zip into a self extracting Zip file c:\test\regular.exe. You should check the ResultCodes value once you are done  if it is XcdSuccess, the operation was succesful. Otherwise, look up the error code in the error codes chart to find out why it didnt work.

Sub Command1_Click ()

  Dim ResultCode As Integer

  XceedZip1.ZipFileName = "c:\test\mytest.zip"

  XceedZip1.SfxBinary = "c:\myapp\xcdsfx16.bin"

  ResultCode = XceedZip1.MakeSelfExtracting

End Sub


MakeSelfExtracting method VB 4.0 and 5.0 example
VB 4.0 and 5.0 OCX example

The following code converts the file c:\test\regular.zip into a self extracting Zip file c:\test\regular.exe. You should check the ResultCodes value once you are done  if it is XcdSuccess, the operation was succesful. Otherwise, look up the error code in the error codes chart to find out why it didnt work.

Sub Command1_Click()

  Dim ResultCode As Integer

  XceedZip1.ZipFileName = "c:\test\mytest.zip"

  XceedZip1.SfxBinary = "c:\myapp\xcdsfx16.bin"

  ResultCode = XceedZip1.MakeSelfExtracting

End Sub


Xceed Zip MemCompress method
MemCompress Method

Delphi example

Applies to

All Xceed Zip components (except the VBX), XCDZIP DLL, XCDZIP32 DLL

Applicable properties

None

Generated events

None

Declarations

Delphi	function MemCompress(SourceBuf: Pointer; SourceSize: LongInt;

TargetBuf: Pointer; TargetSize: LongInt): LongInt;

C++ Builder	long __fastcall MemCompress(void* SourceBuf, long SourceSize,

void* TargetBuf, long TargetSize);

OCX with C++	long MemCompress(long* SourceBuf, long SourceSize,

Long* TargetBuf, long TargetSize);

Description

The MemCompress method compresses data directly in memory using the same Deflate compression algorithm used for compressing files with the Add method. A pointer to the start of the data is passed in the SourceBuf parameter. The total size in bytes of the data is passed in the SourceSize parameter. The data is compressed and placed in the destination data buffer pointed to by the TargetBuf parameter. The size of the destination buffer must be provided in the TargetSize parameter.

Use the MemUncompress method to uncompress data compressed with the MemCompress method.

The target buffer must point to memory that has already been allocated. The target buffer size should be at least 0.1% larger than the source buffer, plus 24 bytes, to allow processing of data that does not compress but takes more space due to extra compressor overhead.

With the 16-bit VCLs, the maximum size of the data buffer to compress is 64K. The maximum size of the data buffer for the 32-bit components is limited only by the amount of available ram. This function has been tested with 16 megabytes of data, and theoretically supports compressing up to 1 gigabyte at a time.

Return value

The return value is the size in bytes of the data written to the Target buffer, if the compression was succesful. The return value is 0 if there is not enough space in the target buffer, if the size of the source buffer is 0, or if there is not enough system memory available to complete the compression. Delphi and C++Builder users will also get a return value of 0 if the required Xceed Zip DLLs are not found.


Xceed Zip MemUncompress method
MemUncompress Method

Delphi example

Applies to

All Xceed Zip components (except the VBX), XCDZIP DLL, XCDZIP32 DLL

Applicable properties

None

Generated events

None

Declarations

Delphi	function MemUncompress(SourceBuf: Pointer; SourceSize: LongInt;

TargetBuf: Pointer): LongInt;

C++ Builder	long __fastcall MemUncompress(void* SourceBuf, long SourceSize,

void* TargetBuf);

OCX with C++	long MemCompress(long* SourceBuf, long SourceSize,

Long* TargetBuf);

Description

The MemUncompress method uncompresses strings that were compressed with the MemCompress method. A pointer to the compressed data is passed in the SourceBuf parameter. The total size in bytes of the source data is passed in the SourceSize parameter. A pointer to the destination buffer where the uncompressed data is passed in the TargetBuf parameter.

The target buffer must point to memory that has already been allocated and is large enough to contain the entire original uncompressed data. Use the MemOriginalSize method to determine the original uncompressed data size (and thus the amount of memory required in the target buffer).

Return value

The return value is 1 if the data was succesfully uncompressed. The return value is 0 if the source buffer points to invalid data, if the target buffer is too small or if there is not enough system memory available to complete the decompression. Delphi and C++Builder users will also get a return value of 0 if the required Xceed Zip DLLs are not found.


Xceed Zip MemOriginalSize method
MemOriginalSize Method

Delphi example

Applies to

All Xceed Zip components (except the VBX), XCDZIP DLL, XCDZIP32 DLL

Applicable properties

None

Generated events

None

Declarations

Delphi	function MemOriginalSize(SourceBuf: Pointer): LongInt;

C++ Builder	long __fastcall MemOriginalSize(void* SourceBuf);

OCX with C++	long MemOriginalSize(long* SourceBuf);

Description

The MemOriginalSize method provides the uncompressed size (in bytes) of data that has been compressed with the MemCompress method. A pointer to the compressed data is passed in the SourceBuf parameter, and the return value of the function represents the amount of space the compressed data will take when it is uncompressed. Use this function to determine how much space you have to allocate for the target buffer when calling the MemUncompress method.

Return value

The return value is 0 if the source buffer points to invalid data, otherwise see above.


MemCompress method Delphi example
Delphi MemCompress, MemUncompress and MemOriginalSize example

The following code allocates 64000 bytes to a buffer called RandomData, then fills it up with random letters of the alphabet, compresses it into a buffer called CompressedData, then uncompresses it to a buffer called UncompressedData. This example calculates the maximum size of the required target buffer for compression and places the value in the CompressedDataMaximumSize variable. Message boxes are displayed with information or error messages. Note: Random data of any form does not compress very well, so dont be surprised at the 33% compression ratio!

procedure TForm1.Button1Click(Sender: TObject);

var

  RandomDataSize: Cardinal;

  CompressedDataMaximumSize: Cardinal;

  CompressedDataSize: Cardinal;

  RandomData: PChar;

  CompressedData: PChar;

  UncompressedData: PChar;

  I: LongInt;

begin

  {We'll compress 64000 bytes.}

  RandomDataSize := 64000;

  GetMem(RandomData,RandomDataSize);

  {Target buffer can be at most 0.1% + 9 bytes more that source buffer}

  CompressedDataMaximumSize := RandomDataSize+

    (RandomDataSize div 1000)+9;

  GetMem(CompressedData,CompressedDataMaximumSize);

  {Fill RandomData buffer with random alphabet letters}

  For I := 0 to RandomDataSize-1 do

    RandomData[i] := Char(65+Random(26));

  {Compress from RandomData buffer to CompressedData buffer}

  CompressedDataSize := XceedZip1.MemCompress(RandomData,

    RandomDataSize, CompressedData, CompressedDataMaximumSize);

  if (CompressedDataSize = 0) then

  begin

    MessageDlg('Could not compress memory buffer.', mtError, [mbOk], 0);

    FreeMem(RandomData,RandomDataSize);

    FreeMem(CompressedData,CompressedDataMaximumSize);

    Halt;

  end

  else

  begin

    {We probably allocated too much earlier. Allocate right amount}

    {In Delphi 3 => ReAllocMem(CompressedData, CompressedDataSize);}

    CompressedData := ReAllocMem(CompressedData,

      CompressedDataMaximumSize,CompressedDataSize);

    MessageDlg('Compressed '+IntToStr(RandomDataSize)+

      ' random alphabet letters to ' +IntToStr(CompressedDataSize)+

      ' bytes.', mtInformation, [mbOk], 0);

  end;

  {Allocate exact amount of space required for uncompressing the data}

  GetMem(UncompressedData,XceedZip1.MemOriginalSize(CompressedData));

  {Now let's uncompress the data to the UncompressedData buffer}

  if (XceedZip1.MemUncompress(CompressedData,CompressedDataSize,

    UncompressedData) = 0) then

    MessageDlg('Could not uncompress memory buffer.', mtError,

    [mbOk], 0)

  else

    MessageDlg('Succesfully uncompressed the compressed data buffer.',

    mtInformation, [mbOk], 0);

  FreeMem(UncompressedData,XceedZip1.MemOriginalSize(CompressedData));

  FreeMem(CompressedData,CompressedDataSize);

  FreeMem(RandomData,RandomDataSize);

end;


Xceed Zip StringCompress method
StringCompress Method

Delphi example VB 3.0 example  VB 4.0 and 5.0 example

Applies to

All Xceed Zip components, XCDZIP DLL, XCDZIP32 DLL

Applicable properties (VBX only)

StringSource, StringTarget

Declarations

Delphi	function StringCompress(Source: String; var Target: String): Integer;

C++ Builder	int __fastcall StringCompress(System::AnsiString Source,

System::AnsiString Target);

VB 3.0	function StringCompress () As Integer

OCX	Integer StringCompress(Source As String, Target As String)

OCX with C++	Short StringCompress(BSTR* Source, BSTR* Target);

Description

The StringCompress method compresses strings directly in memory using the same Deflate compression algorithm used for compressing files with the Add method. The string to compress must be provided in the Source parameter, and the data contained in the source string will be compressed and placed in the string provided in the Target parameter. VBX users must use the StringSource and StringTarget properties instead of the parameters.

Use the StringUncompress method to uncompress strings compressed with the StringCompress method.

With the OCX, the maximum length of the source string is 1073741824 characters. With the 32-bit VCLs and the 16-bit VBX, the maximum length of the source string is 32767 characters. With the 16-bit VCLs, the maximum length of the source string is 255 characters. The characters can contain any data and are not limited to ASCII or Unicode characters. If you need to compress larger amounts of data, or if you have a pointer to the data to compress as opposed to a string, use the MemCompress and MemUncompress methods.

Any data already contained in the Target string will be cleared. The Target string can be empty or unallocated - the StringCompress method will allocate the memory required for the compressed string.

Some 32-bit languages use strings with 16-bits per character. For example, in VB 5.0, when you assign "Hello" to a string, it takes up 10 bytes, because each character takes 2-bytes of memory. The reason for this is that these strings are Unicode strings, and can contain thousands of different characters, not just ASCII/ANSI characters. The compressed string that StringCompress returns in the Target string always uses all 16-bits per character. Care must be taken when manipulating, saving and loading these strings in order to preserve all 16-bits per character, otherwise the string will no longer be recoverable using the StringUncompress function. For example, using Put and Get to write and then read a 16-bit string from a file will not work in VB 5.0. To help with the conversion, we have written two functions for VB 5.0, called ConvertStringTo8Bit and ConvertStringTo16Bit. The ConvertStringTo8Bit transforms a 16-bit string like the one generated by StringCompress into an 8-bit string you can easily save and reload from disk using Put and Get. Once you have reread the string from file, you must convert it back to 16-bits per character using the ConvertStringTo16Bit function before passing it to the StringUncompress function. For more info, look into alternate commands like VB 5.0s AscW and ChrW commands, which do the same thing as Asc and Chr, but for strings with 16-bits per character.

Return value

The return value is 1 if the compression was successful. The return value is 0 if the source string was empty or there was not enough system memory available to complete the decompression. If the return value is 0, the target string will be empty. Delphi and C++Builder users will also get a return value of 0 if the required Xceed Zip DLLs are not found.


Xceed Zip StringUncompress method
StringUncompress Method

Delphi example  VB 3.0 example  VB 4.0 and 5.0 example

Applies to

All Xceed Zip components, XCDUNZIP DLL, XCDUNZ32 DLL

Applicable properties (VBX only)

StringSource, StringTarget

Declarations

Delphi	function StringUncompress(Source: String; var Target: String): Integer;

C++ Builder	int __fastcall StringUncompress(System::AnsiString Source,

System::AnsiString Target);

VB 3.0	function StringUncompress () As Integer

OCX	Integer StringUncompress(Source As String, Target As String)

OCX with C++	Short StringUncompress(BSTR* Source, BSTR* Target);

Description

The StringUncompress method uncompresses strings that were compressed with the StringCompress method. The string to uncompress must be provided in the Source parameter, and the data contained in the source string will be uncompressed and placed in the string provided in the Target parameter. VBX users must use the StringSource and StringTarget properties instead of the parameters.

Any data already contained in the Target string will be cleared. The Target string can be empty or unallocated - the StringCompress method will allocate the memory required for the compressed string.

Return value

The return value is 1 if the operation completed successfully. The return value is 0 if the source string was invalid or there was not system enough memory available to uncompress the string. If the return value is 0, the target string will be empty. Delphi and C++Builder users will also get a return value of 0 if the required Xceed Zip DLLs are not found.


StringCompress method Delphi example
Delphi example

The following code takes a source string, compresses it into a second string, then uncompresses the string into a third string.

procedure TForm1.Button1Click(Sender: TObject);

var

  OriginalStr: String;

  CompressedStr: String;

  UncompressedStr: String;

begin

  OriginalStr := 'Put a long string here to allow good compression.';

  MessageDlg('Original length ' +inttostr(length(OriginalStr)),

    mtInformation, [mbOk], 0);

  XceedZip1.StringCompress(OriginalStr,CompressedStr);

  MessageDlg('Compressed length ' +inttostr(length(CompressedStr)),

     mtInformation, [mbOk], 0);

  XceedZip1.StringUncompress(CompressedStr,UncompressedStr);

  MessageDlg('Uncompressed length ' +inttostr(length(UncompressedStr)),

     mtInformation, [mbOk], 0);

end;


StringCompress method VB 3.0 example
VB 3.0 VBX example

The following code takes a source string, compresses it into a second string, then uncompresses the string into a third string.

Sub Command1_Click ()

  Dim OriginalStr As String

  Dim CompressedStr As String

  Dim UncompressedStr As String

  OriginalStr = "Put a long string here to allow good compression."

  ' Compress into CompressedStr string

  XceedZip1.StringSource = OriginalStr

  ResultCode = XceedZip1.StringCompress

  CompressedStr = XceedZip1.StringTarget

  ' Uncompress into UncompressedStr string

  XceedZip1.StringSource = CompressedStr

  ResultCode = XceedZip1.StringUncompress

  UncompressedStr = XceedZip1.StringTarget

End Sub


StringCompress method VB 4.0 and 5.0 example
VB 4.0 and 5.0 OCX example

The following code takes a source string, compresses it into a second string, then uncompresses the string into a third string.

Sub Command1_Click()

  Dim OriginalStr As String

  Dim CompressedStr As String

  Dim UncompressedStr As String

  OriginalStr = "Put a long string here to allow good compression."

  XceedZip1.StringCompress OriginalStr,CompressedStr

  XceedZip1.StringUncompress CompressedStr, UncompressedStr

End Sub


ConvertStringTo8Bit function
ConvertStringTo8Bit

The following code takes a 16-bit per character source string and returns a 8-bit per character result string.

Function ConvertStringTo8Bit(Source As String) As String

  Dim SrcLength As Long

  Dim I As Long

  Dim Cur16Char As Long

  Dim Dest As String

  Dim TempCalc As Long

  SrcLength = Len(Source)

  Dest = String$(SrcLength * 2, 0)

  For I = 1 To SrcLength

    Cur16Char = AscW(Mid$(Source, I, 1))

    ' Signed/Unsigned conversion

    If Cur16Char < 0 Then Cur16Char = Cur16Char + 65536

    TempCalc = I * 2&

    Mid$(Dest, TempCalc, 1) = Chr$(Cur16Char \ 256)

    TempCalc = (I * 2&) - 1

    Mid$(Dest, TempCalc, 1) = Chr$(Cur16Char And 255&)

  Next I

  ConvertStringTo8Bit = Dest

End Function


ConvertStringTo16Bit function
ConvertStringTo16Bit

The following code takes an 8-bit per character source string and returns a 16-bit per character result string.

Function ConvertStringTo16bit(Source As String) As String

  Dim SrcLength As Long

  Dim I As Long

  Dim Intermediate As Long

  Dim Dest As String

  Dim TempCalc As Long

  SrcLength = Len(Source)

  Dest = String$(SrcLength \ 2, 0)

  For I = 1 To SrcLength Step 2

    Intermediate = Asc(Mid$(Source, I, 1)) + (Asc(Mid$(Source, I + 1, 1)) * 256&)

    If Intermediate > 32768 Then Intermediate = Intermediate - 65536  ' Signed/Unsigned conversion

    TempCalc = (I \ 2&) + 1

    Mid$(Dest, TempCalc, 1) = ChrW$(Intermediate)

  Next I

  ConvertStringTo16bit = Dest

End Function


Xceed Zip Test method
Test Method

Delphi example  C++Builder example  VB 3.0 example  VB 4.0 and 5.0 example

Applies to

All Xceed Zip components, XCDUNZIP DLL, XCDUNZ32 DLL

Applicable properties

Abort, FilesToProcess (Delphi and OCX) , MultidiskMode, Password, ZipFileName

Declarations

Delphi	function Test: Integer;

C++ Builder	int __fastcall Test(void);

VB 3.0	function Test () As Integer

OCX	Integer Test()

Description

The Test method tests files in an archive to verify that they will extract correctly. If all the files in the archive pass the test, the Test method will have a return value of XcdSuccess. A return value of XcdErrorTestFailed indicates that some files did not pass the test and will not extract properly when using the Extract method. A return value of XcdErrorZeroTested indicates that no files ended up being tested. Other return values may also be returned. See the error codes section.

The archive file to be tested must be specified by setting the ZipFileName property.

With Delphi or the OCX, the FilesToProcess property may contain a list of files to test. If the FilesToProcess property is empty, all the files present in the archive file will be tested. With the VBX, use the AddItem method to specify the list of files to test.

Encrypted files cannot be tested unless the correct password is supplied. See the Password property and the PwdQuery event.

During the execution of the Test method, the following events may occur: Testing, Status, GlobalStatus, SkippingFile, and PwdQuery. The SkippingFile event can be used to find out which files, if any, have a bad CRC.

Note: When testing a corrupted archive, the Size, PackedSize/PSize and Completion parameters of the FileStats type events may be incorrect for a damaged file. Therefore, the Completion parameter may not always reach 100% when the damaged file has been fully tested.

Return value

See the first paragraph in the description section above.


Test method Delphi example
Delphi example

The following code calls the test method to verify the integrity of the c:\test\mytest.zip archive file. The ResultCode variable will contain the test results.

procedure TForm1.Button1Click(Sender: TObject);

var

  ResultCode: Integer;

begin

  XceedZip1.ZipFileName := 'c:\test\mytest.zip';

  ResultCode := XceedZip1.Test;

end;


Test method C++Builder example
C++Builder example

The following code calls the test method to verify the integrity of the c:\test\mytest.zip archive file. The ResultCode variable will contain the test results.

void __fastcall TForm1::Button1Click(TObject *Sender)

{

  int ResultCode;

  XceedZip1->ZipFileName = "c:\\test\\mytest.zip";

  ResultCode = XceedZip1-> Test ();

}


Test method VB 3.0 example
VB 3.0 example

The following code calls the test method to verify the integrity of the c:\test\mytest.zip archive file. The ResultCode variable will contain the test results.

Sub Command1_Click ()

  Dim ResultCode As Integer

  XceedZip1.ZipFileName = "c:\test\mytest.zip"

  ResultCode = XceedZip1.Test

End Sub


Test method VB 4.0 and 5.0 example
VB 4.0 and 5.0 OCX example

The following code calls the test method to verify the integrity of the c:\test\mytest.zip archive file. The ResultCode variable will contain the test results.

Sub Command1_Click()

  Dim ResultCode As Integer

  XceedZip1.ZipFileName = "c:\test\mytest.zip"

  ResultCode = XceedZip1.Test

End Sub


Xceed Zip UpdateZipDate method
UpdateZipDate Method

Delphi example  C++Builder example  VB 3.0 example  VB 4.0 and 5.0 example

Applies to

All Xceed Zip components, XCDZIP DLL, XCDZIP32 DLL

Applicable properties

Abort, ZipFileName

Events generated

None

Declarations

Delphi	function UpdateZipDate: Integer;

C++ Builder	int __fastcall UpdateZIPDate(void);

VB 3.0	function UpdateZipDate () As Integer

OCX	Integer UpdateZipDate()

Description

The UpdateZipDate method sets the date of the archive file to the most recent date among the files it contains.

The archive file to be operated on must be specified by setting the ZipFileName property.

The UpdateZipDate method cannot be used on archive files created with the MultidiskMode property set to True.

Return value

The return value is XcdSuccess if the operation was completed without errors, otherwise it is one of the error codes.


UpdateZipDate method Delphi example
Delphi example

The following code calls the UpdateZipDate method to update the date of the c:\test\mytest.zip archive file.

procedure TForm1.Button1Click(Sender: TObject);

begin

  XceedZip1.ZipFileName := 'c:\test\mytest.zip';

  XceedZip1.UpdateZipDate;

end;


UpdateZipDate method C++Builder example
C++Builder example

The following code calls the UpdateZipDate method to update the date of the c:\test\mytest.zip archive file.

void __fastcall TForm1::Button1Click(TObject *Sender)

{

  XceedZip1->ZipFileName = "c:\\test\\mytest.zip";

  XceedZip1->UpdateZipDate();

}


UpdateZipDate method VB 3.0 example
VB 3.0 VBX example

The following code calls the UpdateZipDate method to update the date of the c:\test\mytest.zip archive file.

Sub Command1_Click ()

  Dim ResultCode As Integer

  XceedZip1.ZipFileName = "c:\test\mytest.zip"

  ResultCode = XceedZip1.UpdateZipDate

End Sub;


UpdateZipDate method VB 4.0 and 5.0 example
VB 4.0 OCX example

The following code calls the UpdateZipDate method to update the date of the c:\test\mytest.zip archive file.

Sub Command1_Click()

  Dim ResultCode As Integer

  XceedZip1.ZipFileName = "c:\test\mytest.zip"

  ResultCode = XceedZip1.UpdateZipDate

End Sub;


Xceed Zip Properties

The following properties are used to communicate with the Xceed Zip control. At design time these properties contain default values necessary for common tasks and can be altered visually using your languages property editing window. At run time, your code can change the values of the properties. Some properties only apply to a few Xceed Zip methods. The "Applicable properties" section in the documentation for each method lists the properties that are used by that method.

When executing a method, it is important to correctly set all properties that are used by that method. Unwanted side effects may occur if properties were altered for the execution of one method, but were not set to the desired values for the next execution of a method that uses those properties.

Basic properties: • Abort • ClearDisks • Compression • ExtractDirectory • FilesToProcess (Not in VBX) • IncludeDirectoryEntries • IncludeHiddenFiles • IncludeVolumeLabel • ModifiedDate • MoveFiles • MultidiskMode • Overwrite • Password • Recurse • SelfExtracting • SfxBinary • StoredExtensions • TempPath • UsePaths • UseTempFile • ZipFileName Run-time properties for the VCLs and the VBX:  • FileCount • Files (Delphi only) • ZipComment	Properties that are applicable only when using the Xceed Zip Self- Extractor Module binaries: • SfxButtons • SfxConfigFile • SfxDefaultPassword • SfxIcon • SfxInstallMode • SfxExtractDirectory • SfxMessages • SfxOverwrite • SfxProgramGroup • SfxProgramGroupItems • SfxPromptCreateDirectory • SfxPromptForDirectory • SfxPromptForPassword • SfxPrompts • SfxReadmePath • SfxRegisterExtensions • SfxRunExePath • SfxShowMessages • SfxShowProgress • SfxStrings


Xceed Zip VCL and C++Builder Properties
VCL and C++Builder Properties

Basic properties: Abort ClearDisks Compression ExtractDirectory FileCount Files FilesToProcess IncludeDirectoryEntries IncludeHiddenFiles IncludeVolumeLabel ModifiedDate MoveFiles MultidiskMode Overwrite Password	Recurse SelfExtracting SfxBinary StoredExtensions TempPath UsePaths UseTempFile ZipComment ZipFileName Properties for the Xceed Zip Self- Extractor Module SfxButtons SfxConfigFile SfxDefaultPassword SfxExtractDirectory	SfxIcon SfxInstallMode SfxMessages SfxOverwrite SfxProgramGroup SfxProgramGroupItems SfxPromptCreateDirectory SfxPromptForDirectory SfxPromptForPassword SfxPrompts SfxReadmePath SfxRegisterExtensions SfxRunExePath SfxShowMessages SfxShowProgress SfxStrings


Xceed Zip OCX Properties
OCX Properties

Basic properties: Abort ClearDisks Compression ExtractDirectory FileCount FilesToProcess IncludeDirectoryEntries IncludeHiddenFiles IncludeVolumeLabel ModifiedDate MoveFiles MultidiskMode Overwrite Password	Recurse SelfExtracting SfxBinary StoredExtensions TempPath UsePaths UseTempFile ZipComment ZipFileName Properties for the Xceed Zip Self- Extractor Module SfxButtons SfxConfigFile SfxDefaultPassword SfxExtractDirectory	SfxIcon SfxInstallMode SfxMessages SfxOverwrite SfxProgramGroup SfxProgramGroupItems SfxPromptCreateDirectory SfxPromptForDirectory SfxPromptForPassword SfxPrompts SfxReadmePath SfxRegisterExtensions SfxRunExePath SfxShowMessages SfxShowProgress SfxStrings


Xceed Zip VBX Properties
VBX Properties

Basic properties: Abort ClearDisks Compression ExtractDirectory FileCount IncludeDirectoryEntries IncludeHiddenFiles IncludeVolumeLabel ModifiedDate MoveFiles MultidiskMode Overwrite Password Recurse SelfExtracting	SfxBinary StoredExtensions StringSource StringTarget TempPath UsePaths UseTempFile ZipComment ZipFileName Properties for the Xceed Zip Self- Extractor Module SfxButtons SfxConfigFile SfxDefaultPassword SfxExtractDirectory	SfxIcon SfxInstallMode SfxMessages SfxOverwrite SfxProgramGroup SfxProgramGroupItems SfxPromptCreateDirectory SfxPromptForDirectory SfxPromptForPassword SfxPrompts SfxReadmePath SfxRegisterExtensions SfxRunExePath SfxShowMessages SfxShowProgress SfxStrings


Xceed Zip Self-Extractor Properties
Properties applicable when using the Self-Extractor Module binaries

SfxButtons SfxConfigFile SfxDefaultPassword SfxExtractDirectory SfxIcon SfxInstallMode SfxMessages SfxOverwrite	SfxProgramGroup SfxProgramGroupItems SfxPromptCreateDirectory SfxPromptForDirectory SfxPromptForPassword SfxPrompts	SfxReadmePath SfxRegisterExtensions SfxRunExePath SfxShowMessages SfxShowProgress SfxStrings


Xceed Zip Abort property
Abort Property

Applies to

All Xceed Zip components

Declarations

Delphi	property Abort: Boolean;

C++ Builder	__property bool Abort

VB and OCX	Boolean

Description

The Abort property is used to stop the execution of any Xceed Zip control methods. Set the Abort property to True during the execution of any Xceed Zip methods and they will stop, providing a return value of XcdErrorUserAbort, which indicates that the abort was successfully performed. Abort will be reset to False automatically after the abort.

Typically, a handler for an event such as GlobalStatus will monitor user input and set the Abort property to True at the request of the user.

In order to properly terminate the current operation, the response to the Abort property is not always instantaneous.

Never abort the Add method when the UseTempFile property is set to False, because the archive may become corrupted, even though an attempt is made to restore the archive being modified to a working state.


Xceed Zip FilesToProcess property
FilesToProcess Property

Delphi example  C++Builder exampleVB 4.0 and 5.0 example

Applies to

TXceedZip VCL, Xceed Zip OCX

Declarations

Delphi	property FilesToProcess: TStringList;

C++ Builder	__property Classes::TStringList* FilesToProcess;

OCX	String

Description

The FilesToProcess property is used to provide a list of files to be processed to the Add, Delete, Extract, List, and Test methods. For the Add method, the FilesToProcess property contains the list of files to add, update or freshen. For the other methods, FilesToProcess contains the list of files already inside the archive file that are to be processed.

When using the Add method, there are various ways to specify files with the FilesToProcess property. Filenames may be specified with absolute paths, relative paths or without paths, and wildcards are allowed. If paths are not given, files will be read only from the current directory. If absolute paths are supplied, the entire path, except for the drive letter and : character, will be stored in the Zip file. If relative paths are supplied, the path stored in the zip file will be relative to the current directory. Change your current drive and directory if you want to be able to control or limit which portions of the path will be stored in the Zip file. For example, to store only the "text\spanish.doc" portion of "c:\client\text\spanish.doc", change your current drive to c: and current directory to "c:\client" and specify "text\spanish.doc" as a file to process.

When using the Delete, Extract, List or Test methods, the same path and filenames must be given as those stored in the archive, although wildcards can be used.

With the OCX, the FilesToProcess property is a single string, and all of the filenames must be separated using the return character (ASCII value 13), For example, in VB 4.0/5.0 you can specify two different files like this:

XceedZip1.FilesToProcess = "c:\pictures\*.gif" + Chr$(13)

XceedZip1.FilesToProcess = XceedZip1.FilesToProcess + "c:\bitmaps\*.bmp" + Chr$(13)

In Delphi, each file or wildcard specification is added to the FilesToProcess property by using the TStringList objects Add method. For example:

XceedZip1.FilesToProcess.Add('c:\pictures\*.gif');

The FilesToProcess property is always cleared after the execution of methods that use it, even if an error has occurred.

A special feature of the FilesToProcess property is to allow files to be explicitly excluded or included from the files in the FilesToProcess list. To use this feature, first specify all the files and wildcards you want to process, then specify files to include or exclude among the files to process already specified.

To exclude certain files, place a < symbol before the filename or wildcard expression to exclude, and add it to the FilesToProcess list. To include only certain files, place a > symbol before the filename or wildcard expression. The include or exclude feature may only be used if the FilesToProcess property contains at least one filename or wildcard expression without the < or > symbols. For the Extract, List and Test methods, only the exclude feature is allowed.

Delphi and C++Builder users note: The FilesToProcess property is a TStringList object, so you can use the 'LoadFromFile' method to load a list of files directly from disk. See the TStringList documentation for more information.


FilesToProcess property Delphi example
Delphi example

Here is an example of using the FilesToProcess property, with the Add method, to compress all the files in drive c: ending with .txt, except those files that begin with readme. In this example, we want to preserve the paths along with the filenames, so we set UsePaths to True.

var

ResultCode: Integer;

with XceedZip1 do

  begin

    {Include the contents of any directories found}

    Recurse := True;

    {Store the path to each file in the archive}

    UsePaths := True;

    {Compress all files and directories on drive c:}

    FilesToProcess.Add('c:\*'); {use '*.*' with Delphi 1}

    {But, include only *.txt files}

    FilesToProcess.Add('>*.txt');

    {And exclude any path+filename ending with 'readme.*'}

    FilesToProcess.Add('<*readme.*');

    {Specify the archive file to add the files to}

    ZipFileName := 'c:\test.zip';

    {Start the compression}

    ResultCode := Add(xecAll);

  end;


FilesToProcess property C++Builder example
C++Builder example

Here is an example of using the FilesToProcess property, with the Add method, to compress all the files in drive c: ending with .txt, except those files that begin with readme. In this example, we want to preserve the paths along with the filenames, so we set UsePaths to True.

int ResultCode;

//Include the contents of any directories found

XceedZip1->Recurse = True;

//Store the path to each file in the archive

XceedZip1->UsePaths = True;

//Compress all files and directories on drive c:

XceedZip1->FilesToProcess->Add("c:\\*");

//But, include only *.txt files

XceedZip1->FilesToProcess->Add(">*.txt");

//And exclude any path+filename ending with 'readme.*'

XceedZip1->FilesToProcess->Add("<*readme.*");

//Specify the archive file to add the files to

XceedZip1->ZipFileName = "c:\\test.zip";

//Start the compression

ResultCode = XceedZip1->Add(xecAll);


FilesToProcess property VB 4.0 and 5.0 example
VB 4.0 and 5.0 OCX example

Here is an example of using the FilesToProcess property, with the Add method, to compress all the files in drive c: ending with .txt, except those files that begin with readme. In this example, we want to preserve the paths along with the filenames, so we set UsePaths to True.

  Dim ResultCode As Integer

  ' Include the contents of any directories found

  XceedZip1.Recurse = True

  ' Store the path to each file in the archive

  XceedZip1.UsePaths = True

  ' Compress all files and directories on drive c:

  XceedZip1.FilesToProcess = "c:\*" + Chr$(13) ' in 16-bit use "*.*"

  ' But, include only *.txt files

  XceedZip1.FilesToProcess = XceedZip1.FilesToProcess + ">*.txt" + Chr$(13)

  ' And exclude any path+filename ending with "readme.*"

  XceedZip1.FilesToProcess = XceedZip1.FilesToProcess + "<*readme.*" + Chr$(13)

  ' Specify the archive file to add the files to

  XceedZip1.ZipFileName = "c:\test.zip"

  ' Start the compression

  ResultCode = XceedZip1.Add(xecAll)


Xceed Zip ClearDisks property
ClearDisks Property

Applies to

All Xceed Zip components

Declarations

Delphi	property ClearDisks: Boolean;

C++ Builder	__property bool ClearDisks;

VB and OCX	Boolean

Description

When the ClearDisks property is set to True, the component is instructed to delete all the files and directories present on a disk before writing a zip file to it. ClearDisks is significant only when creating zip files that span multiple disks. In other words, the ClearDisks property is consulted only when you are adding files and only if the MultidiskMode property is set to True.

When deleting files on the destination disk(s), all normal and hidden files and directories are removed. However, read-only and system files are never erased.

Always be careful when you set ClearDisks to True, because the entire contents of a disk or other removable media can be erased if you forget to set ClearDisks and MultidiskMode back to False, and then execute another Add command. In order to help prevent that type of mistake, files and directories are never removed from destination devices that are not considered to be removable media by the system.

In order for ClearDisks to work, the ZipFileName property must contain the full path of the zip file. That means that the drive letter and colon must also be present. For example, you must specify "a:\backup.zip", but not just "backup.zip", even if your current directory is "a:\".

The Xceed Zip Compression Library does not format disks  you must use disks that are already formatting when creating Zip files that span multiple disks.

The default is False.


Xceed Zip Compression property
Compression Property

Applies to

All Xceed Zip components

Declarations

Delphi	property Compression: TXcdCompressionLevel;

C++ Builder	__property TxcdCompressionLevel Compression;

VB and OCX	Integer

Description

The Compression property indicates the compression speed to be used by the Add method when adding, updating or freshening files in an archive. The values allowed are:

Value	Meaning

0	No compression, files are simply stored in the archive.

1	Fastest compression. This setting takes the least amount of time to compress a file, but does not compress as well as the higher settings.

2..8	Intermediate values between the fastest and slowest compression speeds.

9	Slowest compression. This setting gives the best compression ratios. The StoredExtensions property is ignored in this mode.

The default is 6.


Xceed Zip ExtractDirectory property
ExtractDirectory Property

Applies to

All Xceed Zip components

Declarations

Delphi	property ExtractDirectory: String;

C++ Builder	__property System::AnsiString ExtractDirectory;

VB and OCX	String

Description

The ExtractDirectory property is used by the Extract method to determine where to extract files. If the ExtractDirectory property is empty, files will be extracted into the current directory. A path relative to the current directory may also be supplied.

If the destination directory specified with ExtractDirectory does not exist, it will be created. However, only one directory will be created in order to attempt to extract files into the destination directory. For example, if ExtractDirectory is set to "c:\users\fred" but only "c:\users" exists, then the Extract method will create "fred". If "c:\users" itself does not exist, then the extract method will fail and return an error code. This limitation does not apply when recreating any path information already stored in the Zip file.

If there is a trailing backslash, it is ignored. Examples of valid ExtractDirectory values are: "c:\dest", "c:\users\fred\" or even a relative path such as "..\fred".

The 32-bit Xceed Zip components also support UNC paths such as \\ServerName\ShareName\FolderName.

The maximum length of the ExtractDirectory property string is 255 characters when using the Delphi 1 VCL or the VBX.

By default, the ExtractDirectory property is empty.


Xceed Zip FileCount property
FileCount Property

Delphi example  C++Builder example  VB 3.0 example  VB 4.0 and 5.0 example

Applies to

All Xceed Zip components, XCDUNZIP DLL, XCDUNZ32 DLL

Declarations

Delphi	property FileCount: Integer;

C++ Builder	__property int FileCount;

VB and OCX	Integer

Description

The FileCount property contains the number of files contained in the archive file specified in the ZipFileName property. If the file specified by ZipFileName is not found, or any kind of error occurs while reading the archive file, the FileCount property will contain the value 0. Every time the FileCount property is used, the Xceed Zip control will open the archive file and count the number of files it contains.

The FileCount property is read only, and available only at run time for the VBX and VCLs.


Xceed Zip Files property
Files Property

Delphi example

Applies to

TXceedZip VCL, XCDUNZIP DLL, XCDUNZ32 DLL

Declarations

Delphi	property Files[Index: Integer]: TXcdFileStats;

C++ Builder	__property TXcdFileStats Files[Int Index];

Description

The Files property lets you access information on a specific file in the archive, by index number. The index number can be a number ranging from 0, the first file in the archive, up to the number of files in the archive minus 1. The value of the FileCount property provides the number of files in the archive. The information on the file is provided in a TXcdFileStats type.

The archive file must be specified by setting the ZipFileName property.

The Files property is particularly useful in order to avoid keeping all the information for each file in memory at the same time. However, using the List method to obtain information on all the files in an archive is much faster, since the Files property will sequentially search the contents of an archive file every time it is used.

The Files property is read only, and available only at run time.


Files property Delphi example
Delphi example

This example uses the Files and FileCount property to add the filenames of the first and last files in the archive 'c:\test.zip' to a listbox.

with XceedZip1 do

  begin

    ZipFileName := 'c:\test.zip';

    ListBox1.Items.Add('First file: ' + Files[0].Name);

    ListBox1.Items.Add('Last file : ' + Files[FileCount-1].Name);

  end;


Files property C++Builder example
C++Builder example

This example uses the Files and FileCount property to add the filenames of the first and last files in the archive 'c:\test.zip' to a listbox.

XceedZip1->ZipFileName =  "c:\\test.zip";

ListBox1->Items->Add("First file: " + XceedZip1->Files[0].Name);

ListBox1->Items->Add("Last file : " +

  XceedZip1->Files[XceedZip1->FileCount - 1].Name);


Files property VB 3.0 example
VB 3.0 VBX example

This example uses the FileCount property and the GetFileInfo method to add the filenames of the first and last files in the archive 'c:\test.zip' to a listbox.

The GetFileInfo method requests information for the first and last files. For each request, the Listing event is generated by the Xceed Zip VBX. The second procedure below is the handler for the Listing event and it contains the code that actually adds file information into the listbox.

Sub FirstLast ()

  Dim ResultCode As Integer

  XceedZip1.ZipFileName = "c:\test.zip"

  Rem 0 is the index of the first file

  ResultCode = XceedZip1.GetFileInfo(0)

  Rem Subtract 1 from value of FileCount propery for last item

  ResultCode = XceedZip1.GetFileInfo(XceedZip1.FileCount-1)

End Sub

Sub XceedZip1_OnListing (FileName$, Size As Long, PSize As Long, Processed As Long, Attr As Integer, FTime$, CRC As Long, Ratio As Integer, Completion As Integer, Method As Integer, Encrypted As Integer)

  List1.AddItem FileName$ + " (" + Trim$(Str$(Size)) + " bytes)"

End Sub


Files property VB 4.0 and 5.0 example
VB 4.0 and 5.0 OCX example

This example uses the FileCount property and the GetFileInfo method to add the filenames of the first and last files in the archive 'c:\test.zip' to a listbox.

The GetFileInfo method requests information for the first and last files. For each request, the Listing event is generated by the Xceed Zip OCX. The second procedure below is the handler for the Listing event and it contains the code that actually adds file information into the listbox.

Sub FirstLast()

  Dim ResultCode As Integer

  Dim TotalFiles As Integer

  XceedZip1.ZipFileName = "c:\test.zip"

  Rem 0 is the index of the first file

  ResultCode = XceedZip1.GetFileInfo(0)

  Rem Get total number of files

  TotalFiles = XceedZip1.FileCount

  Rem Substract 1 from count to get the index of last item

  ResultCode = XceedZip1.GetFileInfo(TotalFiles - 1)

End Sub

Sub XceedZip1_Listing(FileName As String, ByVal Size As Long, ByVal PSize As Long, ByVal Processed As Long, ByVal Attr As Integer, FTime As String, ByVal CRC As Long, ByVal Ratio As Integer, ByVal Completion As Integer, ByVal Method As Integer, ByVal Encrypted As Integer, ByVal ComLen As Integer, Comment As String)

  List1.AddItem FileName$ + " (" + Str$(Size) + " bytes)"

End Sub


Xceed Zip IncludeDirectoryEntries property
IncludeDirectoryEntries Property

Applies to

All Xceed Zip components

Declarations

Delphi	property IncludeDirectoryEntries: Boolean;

C++ Builder	__property bool IncludeDirectoryEntries;

VB and OCX	Boolean

Description

The IncludeDirectoryEntries property is used by the Add method to determine if directories get their own entry in the archive file. This allows information such as the date and time of creation, and the file attributes of the directory to be stored in the archive. The IncludeDirectoryEntries property does not control whether the actual contents of the directory are included (the Recurse property allows you to control that).

When IncludeDirectoryEntries is set to True, directories get their own entry in the archive file. When IncludeDirectoryEntries is set to False, only files will be added to the archive, and if the Recurse property is set to true, only the contents of directories will be added. No entries for directories themselves will appear in the archive file.

The IncludeDirectoryEntries property is particularly useful when the Recurse property is set to True. By setting IncludeDirectoryEntries to True, even empty directories will be added to the archive, assuring that the entire directory structure can be recreated by extracting the contents of the archive, including empty directories.

IncludeDirectoryEntries is not applicable if the Add method was executed with Cmd = xecFreshen or the UsePaths property is set to False.

The default value is False.


Xceed Zip IncludeHiddenFiles property
IncludeHiddenFiles Property

Applies to

All Xceed Zip components

Declarations

Delphi	property IncludeHiddenFiles: Boolean;

C++ Builder	__property bool IncludeHiddenFiles;

VB and OCX	Boolean

Description

The IncludeHiddenFiles property is used by the Add method to determine if it should include hidden and system files when adding to the archive. IncludeHiddenFiles has no effect if the Add method was executed with the Cmd = xecFreshen parameter, since files already in the archive that must be updated or freshened will be processed even if they are system of hidden files.

The default value is False.


Xceed Zip IncludeVolumeLabel property
IncludeVolumeLabel Property

Applies to

All Xceed Zip components

Declarations

Delphi	property IncludeVolumeLabel: Boolean;

C++ Builder	__property bool IncludeVolumeLabel;

VB and OCX	Boolean

Description

The IncludeVolumeLabel property is used by the Add method to determine if it should add the volume label as an entry in the archive file. If IncludeVolumeLabel is set to True, the volume label of the drive holding the first file to be compressed will be added. To include only the volume label without including files, or to force a specific drive, use the drive name as the first file name in the FilesToProcess property (Delphi and OCX) or AddItem method (VB). Drive names are specified by their drive letter and a colon. For example a: or c:.

The IncludeVolumeLabel property is only used if Add was executed with the xecAll parameter.

The default value is False.


Xceed Zip ModifiedDate property
ModifiedDate Property

Applies to

All Xceed Zip components

Declarations

Delphi	property ModifiedDate: TDateTime;

C++ Builder	__property System::TDateTime ModifiedDate;

VB 3.0	String (Format: "dd/mm/yyyy")

OCX	String (Format: "ddmmyyyy")

Description

The ModifiedDate property is used by the Add method to exclude files that are older than a certain date from being added, updated or freshened. For example, if the ModifiedDate property, which refers to the last modified date of a file, is set to Sept. 10, 1996, only files that have been changed on or after Sept. 10, 1996 will be processed by the Add method. The ModifiedDate does not work with the dates of the files already in the archive, it only checks the dates of the potential files to add, update or freshen.

The modified date property must contain a date. Use Jan. 1, 1980 if you do not wish to limit compression to files after a specific date. Since no Windows files can have a date before this one, all files will be processed by the Add property.

The default value is Jan. 1, 1980.


Xceed Zip MoveFiles property
MoveFiles Property

Applies to

All Xceed Zip components

Declarations

Delphi	property MoveFiles: Boolean;

C++ Builder	__property bool MoveFiles;

VB and OCX	Boolean

Description

The MoveFiles property is used by the Add method to determine if files and directories should be moved into the archive, or only copied. If MoveFiles is set to True, after all the files and directories have been added or updated in the archive, they are deleted. If a directory becomes empty after removal of the files, the directory is also removed. No deletions are done until the Add operation has created the archive and finished adding all the files. If MoveFiles is set to False, the files to be added or updated will not be deleted.

MoveFiles set to True is useful for conserving disk space, but is potentially dangerous because files are not tested in the archive before being deleted.

The default value is False.


Xceed Zip MultidiskMode property
MultidiskMode Property

Applies to

All Xceed Zip components

Declarations

Delphi	property MultidiskMode: Boolean;

C++ Builder	__property bool MultidiskMode;

VB and OCX	Boolean

Description

The MultidiskMode property is used to allow the Xceed Zip component to create and manipulate archive files that span multiple disks. Archive files that cannot fit on a single disk are automatically split into files that reside on different disks.

The default mode of the Xceed Zip component is with MultidiskMode set to False. In this mode you cannot read and write zip files that span multiple disks. If the disk becomes full when adding files to an archive in this mode, the current operation is aborted and an error occurs. Always use the default mode when creating zip archives that are known to fit entirely onto the current disk or storage device, to get the most accurate result/error codes back from Xceed Zip methods.

When MultidiskMode is set to True, if the destination disk becomes full when using the Add method, the Newdisk event is generated and a new disk must be inserted in order to continue adding the rest of the files to the archive. It is acceptable for the new disk to have files present on it, although it must have at least some free space available. You can make free space available by setting the ClearDisks property to True, so that all the files already present on the disk will be erased before writing any zipped data to the disk. If ClearDisks is false, and a disk that is already full is inserted, the XcdErrorDiskFull error will occur. Disks must be formatted in order to be useable with Xceed Zip.

To be able to extract, list and test files in an archive that spans multiple disks, MultidiskMode must be set to True. The Newdisk event will be generated whenever another disk must be inserted.

When MultidiskMode is set to True, you can only use the Add method to create a new archive that spans multiple disks. Once the archive has been created and contains files, no more files can be added to it. Also, you cannot use the Update, Freshen, Delete, Fix and UpdateZipDate functions when MultidiskMode is set to True. If an attempt is made to use these commands in combination with MultidiskMode = True, the XcdErrorMultidiskBadCall error code will be returned.

The format used to allow zip files to span multiple disks is the same format used by PKZip 2.04g. In this format, the directory of files contained in the archive is located on the last disk of the backup set. That is why the last disk must always be inserted before the execution of any method when MultidiskMode is set to True. If the last disk is not inserted, the Newdisk event will occur and your application should request the last disk. In some cases, such as when there are very many files in the archive, the directory may be both on the last disk, and the next-to-last disk. This causes an extra disk swap whenever any method is executed.

When adding files to an archive and MultidiskMode is set to True, if the storage device is a removable media such as a diskette, the volume label of the media is changed to indicate the number of the diskette in the archive set. For this feature to work, a complete path, including drive letter and colon, must be specified in the ZipFileName property.

With the 16-bit Xceed Zip components, temporary files are not used when creating archives that span multiple disks, so the UseTempFile property is ignored when MultidiskMode is set to True. With the 32-bit Xceed Zip components, you can set the UseTempFile property to False, but it is not recommended. When UseTempFile is set to True, archives will be created faster and the side effect described in the next paragraph will not occur.

When using PKZip 2.04g to extract multidisk archives created by the Xceed Zip component with the UseTempFile property set to False, the "Warning! Inconsistent local header for file ..." warning may occur. This warning should be ignored. Files will still extract correctly, and errors in extracted data will still be detected.

It is a good idea to inform your users to label diskettes when creating multiple-disk archives as soon as they have been filled, even though their order and disk number can usually be obtained by checking the volume label.

The default value is False.


Xceed Zip Overwrite property
Overwrite Property

Applies to

All Xceed Zip components

Declarations

Delphi	property Overwrite: TXcdOverwrite;

C++ Builder	__property TXcdOverwrite Overwrite;

VB and OCX	Integer (Enumerated: xowAsk = 0, xowNever = 1, xowAlways = 2)

Description

The Overwrite property is used by the Extract method to determine if extracted files should overwrite files already existing in the destination directory. The Overwrite property can have the following values:

Value	Meaning

xowNever	Existing files will never be replaced by those extracted from the archive. With this setting, the Replace event will not be generated.

xowAlways	Files will always be replaced by those extracted from the archive. With this setting, the Replace event will never be generated.

xowAsk	Generate an Replace event whenever a file is to be overwritten by a file being extracted. In this case, a handler should be written for the Replace event to decide on a file-by-file basis, which files to replace.

The default value is xowAsk.


Xceed Zip Password property
Password Property

Applies to

All Xceed Zip components

Declarations

Delphi	property Password: String;

C++ Builder	__property System::AnsiString Password;

VB and OCX	String

Description

The Password property contains the case-sensitive password to be used to encrypt files being added to an archive, or to decrypt files being extracted or tested from an archive.  This property lets you specify a single password that applies to all files being added, extracted or tested. To be able to specify different passwords for each file, as it is being added, extracted or tested, leave the Password property empty, and respond to the PwdQuery event. The PwdQuery event occurs only when the Password property is empty.

If the Password property is left empty before executing the Extract or Test methods, and the PwdQuery event is not responded to, then no encrypted files will be extracted or tested. If the Password property is not empty when extracting or testing, then the contents of the Password property will be used as the decryption key for all the files being extracted or tested.

When extracting or testing files, every time a file is encountered which cannot be decrypted using the value in the Password property, the SkippingFile event will occur.

If the Password property is empty before executing the Add method, and the PwdQuery event is not responded to, then any newly updated, freshened or added files will not be encrypted. If the Password property is not empty when adding files, then the contents of the Password property are used as the encryption key for all newly updated, freshened or added files.

The encryption algorithm used by the Xceed Zip Compression Library is the same one used by the PKZip 2.04g program. This type of encryption will probably resist attacks by amateurs if the password is well chosen and long enough (at least 20 characters) but it will probably not resist attacks by experts or determined users. Therefore, we suggest that you always use long passwords, and when possible, do not rely solely on this encryption system to protect sensitive data.

Passwords can be up to 80 characters long.

By default, the Password property is empty.


Xceed Zip Recurse property
Recurse Property

Applies to

All Xceed Zip components

Declarations

Delphi	property Recurse: Boolean;

C++ Builder	__property bool Recurse;

VB and OCX	Boolean

Description

The Recurse property is used by the Add method to determine whether it should recursively include the contents of any subdirectories that it encounters when adding files to an archive. Setting Recurse to True will enable this feature. Naturally, you will have to specify the appropriate Wildcards to the FilesToProcess property or the AddItem method (for the VBX) in order to ensure that subdirectory names match properly.

Examples: With the 32-bit components, to zip up the entire contents of the "c:\pictures" directory and all its subdirectories, you must specify "c:\pictures\*" as your files to process. With the 16-bit components, you must specify "c:\pictures\*.*" (similar to the DOS wildcard syntax).

If the Recurse property is set to False, directories listed in the FilesToProcess property or AddItem method will be completely ignored. However, if the IncludeDirectoryEntries property is set to True, the directory itself will get an empty entry in the archive file.

The default value is False.


Xceed Zip SelfExtracting property
SelfExtracting Property

Applies to

All Xceed Zip components

Declarations

Delphi	property SelfExtracting: Boolean;

C++ Builder	__property bool SelfExtracting;

VB and OCX	Boolean

Description

The SelfExtracting property is used by the Add method to determine whether it should create regular Zip files, or executable self-extracting zip files. When the SelfExtracting property is set to True, the self-extractor binary referred to by the SfxBinary property will be prepended to the Zip file as it is being created or updated. The resulting Zip file will then be able to extract its files without requiring any external unzipping applications, components or DLLs.

When creating self-extracting Zip files, the filename specified in the ZipFileName should have the .EXE file extension, so it is recognized as an executable application by the operating system.

A number of properties are provided specifically to allow customizing self-extracting Zip files produced with binaries from the Xceed Zip Self-Extractor Module. You can also use a configuration file (See the SfxConfigFile property) instead of, or in conjunction with these properties.

When using the Xceed Zip Self-Extractor binaries, the Self-Extracting property can be set to True even when the MultidiskMode property is set to True, allowing creation of self-extracting Zip files that span multiple disks.

The default value is False.


Xceed Zip SfxBinary property
SfxBinary Property

Applies to

All Xceed Zip components

Declarations

Delphi	property SfxBinary: String;

C++ Builder	__property System::AnsiString SfxBinary;

VB and OCX	String

Description

The SfxBinary property is used to let Xceed Zip know the filename and location of the binary to use when creating a self-extracting Zip file. You can use the binaries provided with the Xceed Zip Self-Extractor Module (XCDSFX16.BIN, XCDSFX32.BIN) or any 3rd party binary such as the Info-Zip groups free SFX binary (visit http://www.cdrom.com/pub/infozip/Info-Zip.html and look for the UNZ531xN.EXE file, which contains the UNZIPSFX.EXE file. This file is a binary you can use for the SfxBinary property). Only the binaries provided with the Xceed Zip Self-Extractor Module are configurable.

If you do not specify a path and filename in the SfxBinary property and try to create a self-extracting Zip file with the Add or MakeSelfExtracting methods, the method will return the XcdErrorCantOpenBinary.

The maximum length of the SfxBinary property string is 255 characters when using the Delphi 1 VCL or the VBX.

The default value is empty.


Xceed Zip StoredExtensions property
StoredExtensions Property

Applies to

All Xceed Zip components

Declarations

Delphi	property StoredExtensions: String;

C++ Builder	__property System::AnsiString StoredExtensions;

VB and OCX	String

Description

The StoredExtensions property is used to inform the Add method not to compress files with the given suffixes. Such files are simply stored (no compression) in the archive. This property is useful to avoid trying to compress uncompressible files like .zip, .zoo, .lzh and .arj archives, or compressed picture files like .jpg. Trying to compress these files results in only a very small decrease in size, and takes longer than simply storing the files in the archive. CRC checks are still done on stored files.

Specify the list of extensions to only store by beginning each extension with a period, and separating each extension in the list with a semicolon. For example: .zip;.zoo;.lzh;.arj;.jpg.

The StoredExtensions property is ignored if the Compression property is set to 9.

The maximum length of the StoredExtensions property string is 255 characters when using the Delphi 1 VCL or the VBX.

The default value is '.ZIP;.LZH;.ARC;.ARJ;.ZOO'.


Xceed Zip StringSource property (VBX)
StringSource Property

Applies to

Xceed Zip VBX only

VB declaration

String

Description

The StringSource property is used to provide the string to compress or to uncompress when using the VBX StringCompress or StringUncompress methods.


Xceed Zip StringTarget property (VBX)
StringTarget Property

Applies to

Xceed Zip VBX only

VB declaration

String

Description

The StringTarget property is contains the compressed or uncompressed string after a call to the VBX StringCompress or StringUncompress methods. This property is Read Only.


Xceed Zip TempPath property
TempPath Property

Applies to

All Xceed Zip components

Declarations

Delphi	property TempPath: String;

C++ Builder	__property System::AnsiString TempPath;

VB and OCX	String

Description

The TempPath property is used by the Add and Delete methods to find out where to put its temporary archive file. If the TempPath property is empty, the temporary archive file will be created in the same directory as the archive file specified in the ZipFileName property. The TempPath property requires a complete pathname with or without a trailing backslash. For example: c:\temp or c:\temp\. The actual filename of the temporary archive file cannot be specified.

For more information, or to avoid the use of a temporary archive file, see the UseTempFile property.

The maximum length of the TempPath property string is 255 characters when using the Delphi 1 VCL or the VBX.

By default, the TempPath property is empty.


Xceed Zip UsePaths property
UsePaths Property

Applies to

All Xceed Zip components

Declarations

Delphi	property UsePaths: Boolean;

C++ Builder	__property bool UsePaths;

VB and OCX	Boolean

Description

The UsePaths property is used by the Add and Extract methods to determine whether to use complete path information, or only filenames without paths.

When using the Add method and UsePaths is set to True, pathnames are stored in the archive along with filenames for each file being added. If UsePaths is set to False, pathnames will be discarded and only filenames for each file added or updated in the archive will be stored. When UsePaths is set to False, the IncludeDirectoryEntries property is ignored, and no separate entries for directories will be stored in the archive.

When using the Extract method and UsePaths is set to True, pathnames that have been stored in the archive along with filenames will be used to determine where the files will be extracted to. The stored pathnames and files will be created inside the destination extract directory specified with the ExtractDirectory property. If UsePaths is set to False, any pathnames stored in the archive will be ignored and all the files in the archive will be extracted to the destination extract directory.

When using the Add method, care must be taken when the Recurse property is set to True and the UsePaths property is set to False. In effect, it is possible for two different directories to contain a file with the same filename, and because pathnames are being discarded, this may cause the Add method to add two entries with the same filename into the archive. This is an error and will cause the Add method to terminate with a return value of XcdErrorNameRepeat.

The default value is True.


Xceed Zip UseTempFile property
UseTempFile Property

Applies to

All Xceed Zip components

Declarations

Delphi	property UseTempFile: Boolean;

C++ Builder	__property bool UseTempFile;

VB and OCX	Boolean

Description

The UseTempFile property is used by the Add method when creating a new archive, or working on an existing archive, to determine if it should use a temporary archive file. A temporary archive file is also used by the Delete method, but it ignores the UseTempFile property.

The temporary archive file is used to insure that if the current operation fails or is aborted, or a system crash occurs, the original archive file will be left intact. The temporary file is always removed, even if an error occurs during the execution of the Add or Delete methods. However if a system crash or reboot occurs before the operation terminates, the temporary file will be left lying about, and must be removed manually.

The temporary archive file has the filename _Zxxxxxx, where xxxxxx is a unique random number. For example, _Z190518. It has a different filename every time the Add or Delete/DeleteFiles method executes.

The UseTempFile property is considered True when Updating/Freshening a file already in the archive. In other words, you can grow an archive file (without the use of a temporary archive file) when you add new files to it, but not when you are updating a file already in the archive file.

With the 16-bit Xceed Zip components, the UseTempFile property is always considered False when the MultidiskMode property is set to True, or when Updating/Freshening a file with the Add method.

The default value is True.


Xceed Zip ZipComment property
ZipComment Property

Applies to

All Xceed Zip components and Zip/Unzip DLLs

Declarations

Delphi	property ZipComment: String;

C++ Builder	__property System::AnsiString ZipComment;

VB and OCX	String

Description

The ZipComment property lets you read and write the zip file comment of the archive specified in the ZipFileName property.

To set or change a zip file's comment, just change the value of the ZipComment property. The new zip comment will instantly be changed for the zip file named with the ZipFileName property. For example, to set the zip comment to "All of Bill's recent database files" in VB, use:

XceedZip.ZipComment = "All of Bill's recent database files"

To get the zip file's comment, just check the contents of the ZipComment property. In VB for example, you could use something like this :

MsgBox "The zip comment is: " + XceedZip.ZipComment

When the ZipComment is set or changed, the zip file is opened and the zip comment is written. To speed up setting or changing the zip comment of large zip archives, set the UseTempFile property to false. This avoids making a copy of the entire zip archive, but increases the risk of data loss in case the operation fails before completion.

In MultidiskMode, you cannot change the Zip comment. You can only retrieve it. Nothing happens when you try and change the Zip comment when in MultidiskMode.

If the file specified by ZipFileName is not found, or any kind of error occurs while trying to read the archive file and retrieve the zip comment, the ZipComment property will contain the value "Error #X" where X contains the number of the error or warning that occurred. For example, "Error #110". Every time the ZipComment property is accessed, the Xceed Zip control will open the archive file and retrieve the zip file comment.

The zip comment length is limited to 255 characters for 16-bit components, and 32K for 32-bit components.

*For users of the VBX, VCLs or C++Builder component: The ZipComment property is available only at run time and the XCDUNZIP.DLL or XCDUNZ32 DLL is required when reading from the ZipComment property. The XCDZIP.DLL or XCDZIP32 DLL is required when setting or changing the ZipComment property.


Xceed Zip ZipFileName property
ZipFileName Property

Applies to

All Xceed Zip components

Declarations

Delphi	property ZipFileName: String;

C++ Builder	__property System::AnsiString ZipFileName;

VB and OCX	String

Description

The ZipFileName property contains the path and filename for the archive file to be used by the Xceed Zip component's methods. It must be specified in order for these methods to function.

We recommend that the full path and filename for the archive file be supplied. If only the filename is supplied, the archive file will be created or used in the current directory. A path relative to the current directory may also be supplied.

The archive filename can be any valid filename with any extension, although since the Xceed Zip control creates PKZip compatible archives, we recommend using the .zip extension to be able to easily identify the file.

For example, ZipFileName can be install.zip, backup.dat, 'c:\work\backup.zip' or a relative path like ..\archive.zip. A ZipFileName such as test, with no extension, will be taken as test.zip.

When unzipping, if the filename specified in ZipFileName has no extension and the Zip file is not found, Xceed Zip will add the .zip extension to the filename and make a second attempt to find the Zip file.

The maximum length of the ZipFileName property string is 255 characters when using the Delphi 1 VCL or the VBX.

By default, the ZipFileName property is empty.


Xceed Zip SfxButtons property
SfxButtons Property

Applies to

All Xceed Zip components

Declarations

Delphi	property SfxButtons[Index: TXcdSfxButton]: String;

C++ Builder	__property System::AnsiString SfxButtons[TXcdSfxButton Index] = {read=GetSfxButtons, write=SetSfxButtons};

VB and OCX	String array

Description

The SfxButtons property contains the captions for all the buttons that are shown by the Xceed Zip Self-Extractor The values in this property are consulted by Xceed Zip when you are building a self-extracting Zip file.

Button captions can contain the & character, which becomes invisible and causes the following character to be underlined and considered a windows keyboard shortcut character to the button (also known as a keyboard accelerator).

As an indexed string property, each entry in the array is a caption for a different button.

The maximum length string allowed for each entry is 30 characters.

Here is a list of constants for the array index and the button captions they represent:

Array Index Constant	Button Caption

SfxButtonOK (0)	This is the caption for the OK buttons. The default value is "&OK".

SfxButtonCancel (1)	This is the caption for the Cancel button, which is displayed in the directory browser, and can only be changed in the 16-bit self-extractor. The 32-bit self-extractor uses the system's browser and cannot be customized by Xceed Zip. The default value is "&Cancel".

SfxButtonAbort (2)	This is the caption for the Abort button that is displayed on the Progress dialog during extraction. The button allows the user to stop the self-extracting process. The default value is "&Abort".

SfxButtonSkip (3)	This is the caption for the button that provides the option to skip a file. The button is available whenever the Password Prompt dialog is displayed. The default value is "&Skip File".

SfxButtonAlwaysSkip (4)	This is the caption for the button that provides the option to always skip files that cannot be decrypted, without any further prompting with the password dialog. The button is available in the password dialog. The default value is "&Always Skip".

SfxButtonYes (5)	This is the caption for Yes buttons. The default value is "&Yes".

SfxButtonNo (6)	This is the caption for No buttons. The default value is "&No".

SfxButtonOverwriteAll (7)	This is the caption for the button that provides the option to always overwrite files that already exist, without any further prompting with the Overwrite dialog. The button is available in the Overwrite dialog. The default value is "&All".

SfxButtonOverwriteNone (8)	This is the caption for the button that provides the option to never overwrite files that already exist, without any further prompting with the Overwrite dialog. The button is available in the Overwrite dialog. The default value is "N&one".

SfxButtonContinue (9)	This is the caption for the button that is displayed in the introduction message box, and provides the option to continue, as oposed to exiting if the user clicks on the exit button. The default value is "&Continue".

SfxButtonExit (10)	This is the caption for the button that is displayed in the introduction message box and the Select Extract Directory dialog. It provides the option to exit the self-extractor without extracting any files. The default value is "&Exit".

SfxButtonAgree (11)	This is the caption for the Agree button that is displayed in the License agreement dialog box. This button usually indicates that the user accepts the terms of the license agreement and can proceed with the self-extraction process. The default value is "&Agree".

SfxButtonRefuse (10)	This is the caption for the Refuse button that is displayed in the License agreement dialog box. This button usually indicates that the user does not accept the terms of the license agreement and can not proceed with the self-extraction process. The default value is "&Refuse".


Xceed Zip SfxConfigFile property
SfxConfigFile Property

Applies to

All Xceed Zip components

Declarations

Delphi	property SfxConfigFile: String;

C++ Builder	__property System::AnsiString SfxConfigFile;

VB and OCX	String

Description

The SfxConfigFile property lets you specify a configuration file that Xceed Zip will use in order to configure the self-extracting Zip files it produces. The normal method used to configure self-extracting Zip files is by setting the properties built into Xceed Zip for that purpose. The self-extractor configuration properties start with the Sfx suffix.

The configuration file's settings have priority over the Xceed Zip properties that configure the self-extractor. If you wish to specify some settings by using properties and some settings by using a configuration file, then you must remove any settings in the config file that conflict with the properties you are setting in the Xceed Zip control.

The configuration file works just like a Windows 3.x .INI file. There are various sections in the configuration file. Each section begins with the section name enclosed in square brackets. For example: [PATHS].

Each section contains values that you can configure. Some settings are boolean settings, which require a value of 1 (TRUE) or 0 (FALSE). Other settings are string values, which require the string to be enclosed by double quotes ("). Finally, the Overwrite setting in the [Settings] section requires an integer value (0, 1 or 2).

A detailed explanation of the value that can be set in each section follows below. A sample configuration file (SAMPLE.CFG) is included with Xceed Zip  see the Files In This Library topic. Use it as an example and a template for your own configuration file(s).

Here is a list of the sections available in the configuration file. For each section, you will see a list of available settings, along with the Xceed Zip property that corresponds to the setting. See the corresponding property topic to find out what each setting does.

Paths section:

Setting	Type	Corresponding Xceed Zip property

ExtractDirectory	String	SfxExtractDirectory

ReadMePath	String	SfxReadMePath

RunExePath	String	SfxRunExePath

Flags section:

Setting	Type	Corresponding Xceed Zip property

PromptForDirectory	Boolean	SfxPromptForDirectory

PromptForPassword	Boolean	SfxPromptForPassword

PromptCreateDirectory	Boolean	SfxPromptCreateDirectory

ShowProgress	Boolean	SfxShowProgress

ShowSuccessMsg	Boolean	SfxShowMessages indexed property

ShowFailMsg	Boolean	SfxShowMessages indexed property

ShowErrorCreatingDirMsg	Boolean	SfxShowMessages indexed property

ShowIntroMsg	Boolean	SfxShowMessages indexed property

ShowLicenseMsg	Boolean	SfxShowMessages indexed property

Settings section:

Setting	Type	Corresponding Xceed Zip property

DefaultPassword	String	SfxDefaultPassword

Overwrite	Integer	SfxOverwrite

InstallMode	Boolean	SfxInstallMode

Buttons section:

Setting	Type	Corresponding Xceed Zip property

OkBtn	String	SfxButtons indexed property

CancelBtn	String	SfxButtons indexed property

AbortBtn	String	SfxButtons indexed property

SkipBtn	String	SfxButtons indexed property

AlwaysSkipBtn	String	SfxButtons indexed property

YesBtn	String	SfxButtons indexed property

NoBtn	String	SfxButtons indexed property

OverwriteAllBtn	String	SfxButtons indexed property

OverwriteNoneBtn	String	SfxButtons indexed property

ContinueBtn	String	SfxButtons indexed property

ExitBtn	String	SfxButtons indexed property

AgreeBtn	String	SfxButtons indexed property

RefuseBtn	String	SfxButtons indexed property

Prompts section:

Setting	Type	Corresponding Xceed Zip property

DirectoryPrompt	String	SfxPrompts indexed property

PasswordPrompt	String	SfxPrompts indexed property

InsertLastDiskPrompt	String	SfxPrompts indexed property

InsertDiskPrompt	String	SfxPrompts indexed property

AbortExtractPrompt	String	SfxPrompts indexed property

CreateDirectoryPrompt	String	SfxPrompts indexed property

OverwritePrompt	String	SfxPrompts indexed property

Strings section:

Setting	Type	Corresponding Xceed Zip property

TitleStr	String	SfxStrings indexed property

ExtractingFileStr	String	SfxStrings indexed property

ProgressStr	String	SfxStrings indexed property

CurrentExtractDirStr	String	SfxStrings indexed property

Messages section:

Setting	Type	Corresponding Xceed Zip property

IntroMsg	String	SfxMessages indexed property

SuccessMsg	String	SfxMessages indexed property

FailMsg	String	SfxMessages indexed property

ErrorCreatingDirMsg	String	SfxMessages indexed property

LicenseMsg	String	SfxMessages indexed property

Registration section:

Setting	Type	Corresponding Xceed Zip property

ProgramGroup	String	SfxProgramGroup property

ProgramGroupItems	String	SfxProgramGroupItems property

RegisterExtensions	String	SfxRegisterExtensions property


Xceed Zip SfxDefaultPassword property
SfxDefaultPassword Property

Applies to

All Xceed Zip components

Declarations

Delphi	property SfxDefaultPassword: String;

C++ Builder	__property System::AnsiString SfxDefaultPassword;

VB and OCX	String

Description

The SfxDefaultPassword property lets you specify the password that the self-extractor will use whenever it tries to extract an encrypted file. If this property is left empty, or the password specified is incorrect for any of the encrypted files, then the self-extractors Password Prompt dialog will be displayed (subject to the value in the SfxPromptForPassword property).

This property can be useful for developers that want to create self-extracting Zip files that cannot be extracted by programs such as PKUnzip or WinZip without the appropriate decryption password.

The maximum length string allowed for this property is 80 characters.

The default is an empty password.


Xceed Zip SfxExtractDirectory property
SfxExtractDirectory Property

Applies to

All Xceed Zip components

Declarations

Delphi	property SfxExtractDirectory: String;

C++ Builder	__property System::AnsiString SfxExtractDirectory;

VB and OCX	String

Description

The SfxExtractDirectory property lets you specify the path where the self-extractor extracts files to by default. This can be changed later by the user if the SfxPromptForDirectory property is set to True. If the SfxExtractDirectory property is empty, the self-extractor's current directory at run-time will be used.

The following macros are available when specifying a value for the SfxExtractDirectory property: %w, %s,%t, %r, %e, %p and %v.

The maximum length string allowed for this property is 255 characters.

The default value is empty.


Xceed Zip SfxIcon property
SfxIcon Property

Applies to

All Xceed Zip components

Declarations

Delphi	property SfxIcon: TIcon;

C++ Builder	__property Graphics::Ticon*;

VB and OCX	Icon

Description

The SfxIcon property lets you customize the self-extractors application icon. This is the icon Windows uses to display the executables icon, as well as the icon that appears in the title bar of all the self-extractors dialog boxes. You can assign any valid windows icon (.ICO) file to this property. When this property is left empty (no icon is assigned), the self-extractor will use its built-in Zip icon.

Note that the type for this property is Icon. You can not assign a string representing a path and filename to this property. When assigning a value to this property in your code, you must use functions built into your language to load the icons data directly into the property. For example, in VB, assign the return value of the LoadPicture function to the SfxIcon property.

The default value is empty.


Xceed Zip SfxInstallMode property
SfxInstallMode Property

Applies to

All Xceed Zip components

Declarations

Delphi	property SfxInstallMode: Boolean;

C++ Builder	__property bool SfxInstallMode

VB and OCX	Boolean

Description

The SfxInstallMode property is a special mode you can put the self-extractor in. When SfxInstallMode is set to True, the self-extractor will wait until the application executed by the self-extractor (see the SfxRunExePath property) has terminated, and then delete all the files that were extracted and any new directories that were created. When SfxInstallMode is True and nothing is specified in the SfxExtractDirectory property (recommended), the self-extractor will extract files in a random directory in the systems temporary directory (the equivalent of putting %t\%r in the SfxExtractDirectory property). Also, the self-extractors Select Extract Directory dialog box is not displayed when SfxInstallMode is True.

This property is particularly useful when the self-extractor is being used in order to extract and run an install or setup program. Once the setup program has finished copying all the files to the appropriate locations, and has terminated, setting the SfxInstallMode property to True allows you to ensure that the now unneeded files are erased from the system.

The default value is False.


Xceed Zip SfxMessages property
SfxMessages Property

Applies to

All Xceed Zip components

Declarations

Delphi	property SfxMessages[Index: TXcdSfxMessage]: String;

C++ Builder	__property System::AnsiString SfxMessages[TXcdSfxMessage Index] = {read=GetSfxMessages, write=SetSfxMessages};

VB and OCX	String array

Description

The SfxMessages property contains the text that is displayed by the various information dialog boxes shown by the self-extractor. The values in this property are consulted by Xceed Zip when you are building a self-extracting Zip file.

As an indexed string property, each entry in the array is text used in a different information dialog box.

For 32-bit components, the maximum length string allowed for each entry in this property is 2000 characters, except for the license agreement message which can contain up to 8000 characters. For 16-bit components, the maximum length for all SfxMessages string entries are 255 characters.

Here is a list of constants for the array index and the dialog message they represent:

Array Index Constant	Dialog message

SuccessMsg (0)	This message is displayed in the Success dialog box upon succesful extraction of all the files in the archive. The default value is "All files were successfully extracted.

FailMsg (1)	This message is displayed in the Fail dialog box if an error occurs during the extraction process.

The following macros are available when specifying

a value for ErrorCreatingDirMsg:

%e = The error code that caused the failure.

The default value is "Error during extraction. One or more files were not successfully extracted. (Code %e)"

ErrorCreatingDirMsg (2)	This message is displayed in the Error Creating Directory dialog box.

The following macros are available when specifying a value for ErrorCreatingDirMsg:

%d = The directory that could not be created.

The default value is "Unable to create directory '%d'"

IntroMsg (3)	This message is displayed in the Introduction dialog box. The default value is "Welcome to the Xceed Zip

The default value is "Welcome to the Xceed Zip Self-Extractor. This program will extract some files onto your system."

LicenseMsg (4)	This is the message displayed in the License agreement dialog box. The license agreement dialog box allows you to display a license agreement and to force the user to either accept or reject the terms of the agreement. If the terms are rejected, the self-extractor will terminate and no files will be extracted.

The default value is empty.

If you do not want the self-extractor to display any of these messages or dialogs, use the SfxShowMessages property to disable them.


Xceed Zip SfxOverwrite property
SfxOverwrite Property

Applies to

All Xceed Zip components

Declarations

Delphi	property SfxOverwrite: TXcdOverwrite;

C++ Builder	__property TXcdOverwrite SfxOverwrite;

VB and OCX	Integer (Enumerated: xowAsk = 0, xowNever = 1, xowAlways = 2)

Description

The SfxOverwrite property lets you determine the overwrite behavior exhibited by self-extracting zip files whenever files are being extracted that already exist in the destination directory. The SfxOverwrite property can have the following values:

Value	Meaning

0	Prompt user to confirm with the Overwrite dialog. The Overwrite dialog prompts the user on how to proceed. The user can select the "Yes" button (see YesBtn) to overwrite the file, the "No" button (see NoBtn) to skip the file, the "All" button (see OverwriteAllBtn) to overwrite the file and any subsequent files that already exist, and finally the "None" button (see OverwriteNoneBtn) to skip the file and any other files that already exist.

1	Never overwrite files, and do not prompt user.

2	Always overwrite files, and do not prompt user.

The default value is 0.


Xceed Zip SfxProgramGroup property
SfxProgramGroup Property

Applies to

All Xceed Zip components

Declarations

Delphi	property SfxProgramGroup: String;

C++ Builder	__property System::AnsiString SfxProgramGroup

VB and OCX	String

Description

The SfxProgramGroup property lets you specify the name of a program group that the self-extractor will create after successfully extracting files. If this property is left empty, no program group will be created.

Use the SfxProgramGroupItems property to specify the contents of the program group created by the self-extractor.

The program group is created before the text file specified in the SfxReadmePath property is displayed, and before the executable specified in the SfxRunExePath is executed.

The maximum length of the SfxProgramGroup property string is 255 characters when using the Delphi 1 VCL or the VBX.

The default value is empty.


Xceed Zip SfxProgramGroupItems property
SfxProgramGroupItems Property

Applies to

All Xceed Zip components

Declarations

Delphi	property SfxProgramGroupItems: String;

C++ Builder	__property System::AnsiString SfxProgramGroupItems

VB and OCX	String

Description

The SfxProgramGroupItems property lets you specify the items to be created in the program group specified in the SfxProgramGroup property.

Each item in the list consists of a path+filename as well as a name. You must separate the file+pathname from the name using the | character (ascii value 124). Each item must be separated by a CR character (ascii value 13) or the CR/LF characters (ascii value 13 followed by ascii value 10). See below for an example.

The following macros are available when specifying a value for the path+filename portion of an item: %w, %s, %t, %e, %d, %p and %v.

Here is an example of a string used to provide 3 items to the SfxProgramGroupItems property using VB:

XceedZip1.SfxProgramGroupItems = "%d\Tetris\Tetris.exe|Play Tetris Now" + chr$(13) + "%d\Tetris\readme.txt|Read me!" + chr$(13) + "%d\Tetris\Register.exe|Register Online!"

In Delphi, you would do this:

XceedZip1.SfxProgramGroupItems.Add('%d\Tetris\Tetris.exe|Play Tetris Now');

XceedZip1.SfxProgramGroupItems.Add('%d\Tetris\readme.txt|Read me!');

XceedZip1.SfxProgramGroupItems.Add('%d\Tetris\Register.exe|Register Online!');

The maximum length of the SfxProgramGroupItems property string is 255 characters when using the Delphi 1 VCL or the VBX.

The default value is empty.


Xceed Zip SfxPromptCreateDirectory property
SfxPromptCreateDirectory Property

Applies to

All Xceed Zip components

Declarations

Delphi	property SfxPromptCreateDirectory: Boolean;

C++ Builder	__property bool SfxPromptCreateDirectory

VB and OCX	Boolean

Description

The SfxPromptCreateDirectory property lets you determine whether self-extractor will display the Create Directory dialog box if the directory where files will be extracted to does not exist. Setting the SfxPromptCreateDirectory to True will cause the dialog box to be displayed. Setting it to False will cause the self-extractor to automatically create the directory where files will be extracted to, if it does not already exist.

The Create Directory dialog box informs the user that the given directory does not exist. The user can select either the YES button or the NO button. Selecting the YES button will allow the self-extractor create the directory and begin extracting files into it. If the NO button is selected, the Select Extract Directory box will be displayed again, or, if the PromptForDirectory flag is set to False, the program will terminate and display the FailMsg dialog.

See the SfxPrompts property if you wish to modify the text displayed in the Create Directory dialog.

The default value is True


Xceed Zip SfxPromptForDirectory property
SfxPromptForDirectory Property

Applies to

All Xceed Zip components

Declarations

Delphi	property SfxPromptForDirectory: Boolean;

C++ Builder	__property bool SfxPromptForDirectory

VB and OCX	Boolean

Description

The SfxPromptForDirectory property lets you determine whether self-extracting Zip files will display the Select Extract Directory dialog box. This dialog box allows the user to view and change the directory where files will be extracted to.

The Select Extract Directory dialog contains a Browse button that opens up a directory browser to allow for easy directory selection. It also contains an Ok and Exit button. The Ok button dismisses the dialog box and cause the self-extractor to start extracting files into the selected directory. The Exit button causes the self-extractor to terminate.

See the SfxPrompts property if you want to customize the prompt used when selecting the extract directory.

The default value is True.


Xceed Zip SfxPromptForPassword property
SfxPromptForPassword Property

Applies to

All Xceed Zip components

Declarations

Delphi	property SfxPromptForPassword: Boolean;

C++ Builder	__property bool SfxPromptForPassword

VB and OCX	Boolean

Description

The SfxPromptForPassword property lets you determine whether the self-extractor will display the Password Prompt dialog box whenever it encounters an encrypted file that it cannot decrypt with the current password, or with the password specified by the DefaultPassword setting. Set the SfxPromptForPassword property to True to enable the Password Prompt dialog.

The Password Prompt dialog box permits the user to enter a password for the file to be decrypted. The password entered then becomes the current password, and is used to decrypt the rest of the files until a file encrypted with a different password is encountered.

 Once the user has entered the password, they must click on the OK button to continue. The user may click on the "Skip" button (see SkipBtn) if they do not know the password for the file or do not wish to extract it. The user may click on the "Always skip" button (see AlwaysSkipBtn) if they want to skip this file and any other file which the current password cannot decrypt.

If you set the SfxPromptForPassword property to False, all files that cannot be decrypted with the password specified by DefaultPassword will be skipped.

The default value is True


Xceed Zip SfxPrompts property
SfxPrompts Property

Applies to

All Xceed Zip components

Declarations

Delphi	property SfxPrompts[Index: TXcdSfxPrompt]: String;

C++ Builder	__property System::AnsiString SfxPrompts[TXcdSfxPrompt Index] = {read=GetSfxPrompts, write=SetSfxPrompts};

VB and OCX	String array

Description

The SfxPrompts property contains prompts that are found inside the various dialog boxes displayed by the self-extractor. The values in this property are consulted by Xceed Zip when you are building a self-extracting Zip file.

As an indexed string property, each entry in the array is the text of a different prompt.

The maximum length string allowed for each entry in this property is 255 characters.

Here is a list of constants for the array index and the prompt they represent:

Array Index Constant	Prompt

DirectoryPrompt (0)	This prompt is displayed in the Select Extract Directory dialog box. The prompt asks the user to select the path where the files will be extracted to.

The default value is "Select the path where you want to extract the files to."

PasswordPrompt (1)	This prompt asks the user to enter a password for a given file. It is displayed in the Password Prompt dialog box.

The default value is "A password is required for file:"

InsertLastDiskPrompt (2)	This prompt asks the user to insert the last disk of the set of disks containing the self-extractor and its files. This prompt is used when the self-extractor spans multiple disks, and the last disk is required.

The default value is "Please insert the last disk of the set."

InsertDiskPrompt (3)	This prompt asks the user to insert a specific disk from the set of disks containing the self-extractor and its files. This prompt is used when the self-extractor spans multiple disks, and a specific disk is required.

The following macros are available when specifying a value for InsertDiskPrompt:

%n = The number of the requested disk.

The default value is "Please insert disk #%n."

AbortExtractPrompt (4)	This prompt asks the user if they really wish to abort the self-extracting process, after having clicked on the "Abort" button (see AbortBtn).

The default value is "Are you sure you want to abort the self-extracting process?"

CreateDirectoryPrompt (5)	This is the text displayed in the Create Directory dialog. The text informs the user that the directory where files will be extracted to does not exist, and asks the user if they wish to create the directory.

The following macros are available when specifying a value for CreateDirectoryPrompt:

%d = The directory to create

The default value is "Directory '%d' does not exist. Do you want to create it?"

OverwritePrompt (6)	This prompt asks the user if they wish to overwrite a file that already exists. It is used in the Overwrite dialog. See the Overwrite setting for information on what choices the user has when the Overwrite dialog is displayed.

The following macros are available when specifying a value for OverwritePrompt:

%f = The path and filename of the file to overwrite

The default value is "The file '%f' already exists. Do you want to overwrite it?"


Xceed Zip SfxReadmePath property
SfxReadmePath Property

Applies to

All Xceed Zip components

Declarations

Delphi	property SfxReadmePath: String;

C++ Builder	__property System::AnsiString SfxReadmePath;

VB and OCX	String

Description

The SfxReadmePath property lets you specify the path and filename of a text file that will be displayed by the self-extractor upon successfully extracting its files. The file is displayed using Notepad, right before the executable specified by RunExePath is run.

If ReadmePath is empty, no text file will be displayed.

The maximum length string allowed for this property is 255 characters.

The default value is empty.


Xceed Zip SfxRegisterExtensions property
SfxRegisterExtensions Property

Applies to

All Xceed Zip components

Declarations

Delphi	property SfxRegisterExtensions: String;

C++ Builder	__property System::AnsiString SfxRegisterExtensions;

VB and OCX	String

Description

The SfxRegisterExtensions property lets you assign filename extensions that the self-extractor will register with Windows.

Registering a filename extension allows Windows to recognize files that have a specific filename extension. Windows will be able to show a description of the files ending with a given extension (in Windows Explorer, for example) and execute an application whenever that type of file is opened. Thus, when specifying each filename extension to be registered, you must provide a description and an associated application. The associated application must be able to open the files ending with that extension.

The entire list of extensions to register are placed into one string that you assign to the SfxRegisterExtensions property. Each extension to register consists of the extensions description, the extension (do not include the . character) and the path+filename of the associated application. You must separate the description, extension and file+pathname by using the | character (ascii value 124). Each extension to register must be separated by a CR character (ascii value 13) or the CR/LF characters (ascii value 13 followed by ascii value 10).  See below for an example.

The following macros are available when specifying a value for the path+filename of the application associated to each extension: %w, %s, %d, %t, %e, %p and %v.

Here is an example of a string used to provide 3 extensions to the SfxProgramGroupItems property using VB:

XceedZip1.SfxRegisterExtensions = "Zip file|zip|%d\ZipView\ZipView.exe" + chr$(13) + "High score file|sco|%p\Tetris\Tetris.exe" + chr$(13) + "Read me file|me|%w\notepad.exe"

In Delphi, you would do this:

XceedZip1.SfxRegisterExtensions := 'Zip file|zip|%d\ZipView\ZipView.exe' + #13 + 'High score file|sco|%p\Tetris\Tetris.exe' + #13 + 'Read me file|me|%w\notepad.exe';

The extensions are registered right after the program group specified by the SfxProgramGroup property is created, and before the text file specified in the SfxReadmePath property is displayed and the executable specified in the SfxRunExePath is executed.

The default value is empty.


Xceed Zip SfxRunExePath property
SfxRunExePath Property

Applies to

All Xceed Zip components

Declarations

Delphi	property SfxRunExePath: String;

C++ Builder	__property System::AnsiString SfxRunExePath;

VB and OCX	String

Description

The SfxRunExePath property lets you specify the path and filename of an executable that the self-extractor will run upon successfully extracting its files.

A command line for the executable can be specified by adding a space after the path and filename, followed by the command line.

The following macros are available when specifying a value for the SfxRunExePath property: %w, %s, %d, %t, %e, %p and %v.

If the SfxRunExePath property is empty, no program will be run.

The maximum length string allowed for this property is 255 characters.

The default value is empty.


Xceed Zip SfxShowMessages property
SfxShowMessages Property

Applies to

All Xceed Zip components

Declarations

Delphi	property SfxShowMessages[Index: TXcdSfxMessage]: Boolean;

C++ Builder	__property bool SfxMessages[int Index] = {read=GetSfxShowMessages, write=SetSfxShowMessages};

VB and OCX	Boolean array

Description

The SfxShowMessages property lets you enable or disable the dialog boxes that display the various messages you can configure with the SfxMessages property.

As an indexed boolean property, each entry in the array is text used to determine whether a particular dialog box will be displayed.

The entries in the array correspond on a one-to-one basis with the entries for the SfxMessages property.

Here is a list of constants for the array index and the what they do:

Array Index Constant	Dialog message

SuccessMsg (0)	When True, the self-extractor will display the Success dialog box upon succesful extraction of all the files in the archive. The Success dialog box contains a message which by default informs the user that all the files have been successfully extracted. The Ok button dismisses the dialog.

The default value is True.

FailMsg (1)	When True, the self-extractor will display the Fail dialog box if the there was a problem extracting the files in the archive. The Fail dialog box contains a message which by default informs the user that one or more files could not be extracted. The Ok button dismisses the dialog.

The default value is True.

ErrorCreatingDirMsg (2)	When True, the self-extractor will display the Error Creating Directory dialog box if the directory where files will be extracted to could not be created. The Error Creating Directory dialog box contains a message which by default informs the user that the given directory could not be created. The Ok button dismisses the dialog.

The default value is True.

IntroMsg (3)	When True, the self-extractor will display the Introduction dialog box as soon as the self-extractor is executed. The dialog box contains a message which by default welcomes the user to the self-extractor and informs them that some files will be extracted onto their system. The Introduction dialog box has a Continue button and an Exit button. If the user selects the Continue button, the self-extract process will begin. If the user selects the Exit button, the program will terminate.

The default value is True.

LicenseMsg (4)	When True, the self-extractor will display the License agreement dialog box right after the introduction message dialog. The license agreement dialog box allows you to display a license agreement and to force the user to either agree to, or refuse the terms of the agreement. If the terms are refused, the self-extractor will terminate and no files will be extracted. If the terms are agreed to, the self-extracting process will proceed. The two buttons on this dialog are called the Agree button and the Refuse button.

The default value is False.


Xceed Zip SfxShowProgress property
SfxShowProgress Property

Applies to

All Xceed Zip components

Declarations

Delphi	property SfxShowProgress: Boolean;

C++ Builder	__property bool SfxShowProgress

VB and OCX	Boolean

Description

The SfxShowProgress property lets you determine whether the self-extractor will display a Progress dialog box while it is extracting files. Set the SfxShowProgress to True in order to make the self-extractor display the dialog.

This Progress dialog box displays the path and filename of the file currently being extracted as well as a completion percentage for that file. The overall completion is also presented in the form of a progress gauge.

The default value is TRUE


Xceed Zip SfxPrompts property
SfxStrings Property

Applies to

All Xceed Zip components

Declarations

Delphi	property SfxStrings[Index: TXcdSfxString]: String;

C++ Builder	__property System::AnsiString SfxStrings[TXcdSfxString Index] = {read=GetSfxStrings, write=SetSfxStrings};

VB and OCX	String array

Description

The SfxStrings property contains label captions and other miscellaneous text that are found inside the various dialog boxes displayed by the self-extractor. The values in this property are consulted by Xceed Zip when you are building a self-extracting Zip file.

As an indexed string property, each entry in the array is the text of a different label.

The maximum length string allowed for each entry in this property is 255 characters, except for the TitleStr (index 2) entry, which can only be 100 characters long.

Here is a list of constants for the array index and the prompt they represent:

Array Index Constant	Label or text string

ExtractingFileStr (0)	This is the string used to indicate which file is currently being extracted. It is used in the Progress dialog box.

The default value is "Extracting file:"

ProgressStr (1)	This is the string used to explain the purpose of the progress gauge that shows the overall progress of the extract operation.

The default value is "Overall progress:"

TitleStr (2)	This is string that appears in the title bar of every message box and dialog box displayed by the Xceed Zip self-extractor.

The default value is "The Xceed Zip Self-Extractor"

CurrentExtractDirStr (3)	This is the string that is used in the directory browser to indicate the user-selected directory where the files will be extracted to.

The default value is "Current extract directory:"

DriveShareStr (4)	This is the string used to display the available connected drives in the directory browser's drive list.

The following macros are available when specifying a value for DriveShareStr:

%s = Share name

%c = Computer name where share is located

The default value is "%s on '%c'"

EntireNetworkStr (5)	This is the string used to represent the entry in the directory browser's drive list that represents the entire network.

The default value is "Entire Network"


Xceed Zip Events

Events generated by the Xceed Zip control represent activities that your program can recognize and act upon. For example, the Adding event occurs when a file is being added to an archive. So if you want to, you can write an event handler (the code that specifies how to respond to such an event) for the Adding event that displays "Adding file:" on a status bar along with the filename of the file currently being added.

With Visual FoxPro 5.0, events will be triggered only if you set Application.AutoYield = .F.. Place this code in the section of your main program where you set up your environment. If you only have a single form in your application that uses Xceed Zip, place Application.AutoYield = .F. in the forms load method, and set it back to the default in the forms destroy method.

The following events are generated by the Xceed Zip control. They can be found in Delphi in the Object Inspector's events page, or the Properties window in VB when the Xceed Zip control is selected on a form.

• Adding • Deleting • Extracting • FileComment • Fixing • GlobalStatus • Listing • Newdisk	• PwdQuery • Rename • Replace • SkippingFile • Status • Testing • Updating
Note: Code in event handlers for the above Xceed Zip events cannot recursively call Xceed Zip functions or access the Files, FileCount or ZipComment properties.


Xceed Zip Events
Events

Adding Deleting Extracting FileComment Fixing	GlobalStatus Listing Newdisk PwdQuery Rename	Replace SkippingFile Status Testing Updating


Xceed Zip Adding event
Adding Event

Delphi example  C++Builder example  VB 3.0 example  VB 4.0 and 5.0 example

Declarations

Delphi	property OnAdding: TXcdFileStatsEvent;

C++ Builder	__property TXcdFileStatsEvent OnAdding;

VB 3.0	Sub XceedZip_OnAdding (Filename As String, Size As Long, PSize As Long, Processed As Long, Attr As Integer, FTime As String, CRC As Long, Ratio As Integer, Completion As Integer, Method As Integer, Encrypted As Integer, Comment As String)

For a description of each parameter see the FileStats Events (VBX) topic.

OCX	VOID Adding(PTR to String FileName, Long Size, Long PSize, Long Processed, Integer FileAttr, PTR to String FTime, Long CRC, Integer Ratio, Integer Completion, Integer Method, Integer Encrypted, Integer ComLen, PTR to String Comment)

For a description of each parameter see the FileStats Events (OCX) topic.

Description

The Adding event occurs once for each file that is about to be added to an archive as a result of executing the Add method. The Adding event occurs just before compression or storage of the given file takes place. A handler for the Adding event has access to the files filename, uncompressed size, etc.

Note: The Updating event will occur instead of the Adding event when adding files that are already present in the Zip archive.


Adding event Delphi example
Delphi example

A typical handler for the Adding event, such as the one in this example, might simply change the caption of a label to display the name of the file or directory currently being added.

procedure TForm1.XceedZip1Adding(XceedZip: TXceedZip; const FileStats: TXcdFileStats);

begin

  if (xfaDirectory in FileStats.Attributes) then

    Label1.Caption := 'Now adding directory: ' + FileStats.Name

  else

    Label1.Caption := 'Now adding file: ' + FileStats.Name;

end;


Adding event C++Builder example
C++Builder example

A typical handler for the Adding event, such as the one in this example, might simply change the caption of a label to display the name of the file or directory currently being added.

void __fastcall TForm1::XceedZip1Adding(TXceedZip *XceedZip,	const TXcdFileStats &FileStats)

{

  if (FileStats.Attributes.Contains(xfaDirectory))

    Label1->Caption = "Now adding directory: " + FileStats.Name;

  else

    Label1->Caption = "Now adding file: " + FileStats.Name;

}


Adding event VB 3.0 example
VB 3.0 VBX example

A typical handler for the Adding event, such as the one in this example, might simply change the caption of a label to display the name of the file or directory currently being added.

Sub XceedZip1_OnAdding (Filename As String, Size As Long, PSize As Long, Processed As Long, Attr As Integer, FTime As String, CRC As Long, Ratio As Integer, Completion As Integer, Method As Integer, Encrypted As Integer, Comment As String)

  If (Attr And xfaDirectory) = 0 Then

    Label1.Caption = "Now adding file: " + Filename

  Else

    Label1.Caption = "Now adding directory: " + Filename

  End If

End Sub


Adding event VB 4.0 and 5.0 example
VB 4.0 and 5.0 OCX example

A typical handler for the Adding event, such as the one in this example, might simply change the caption of a label to display the name of the file or directory currently being added.

Sub XceedZip1_Adding(Filename As String, ByVal Size As Long, ByVal PSize As Long, ByVal Processed As Long, ByVal FileAttr As Integer, FTime As String, ByVal CRC As Long, ByVal Ratio As Integer, ByVal Completion As Integer, ByVal Method As Integer, ByVal Encrypted As Integer, ByVal ComLen As Integer, Comment As String)

  If (FileAttr And xfaDirectory) = 0 Then

    Label1.Caption = "Now adding file: " + Filename

  Else

    Label1.Caption = "Now adding directory: " + Filename

  End If

End Sub


Xceed Zip Deleting event
Deleting Event

Delphi example  C++Builder example  VB 3.0 example  VB 4.0 and 5.0 example

Declarations

Delphi	property OnDeleting: TXcdFileNameEvent;

C++ Builder	__property TXcdFileNameEvent OnDeleting;

VB 3.0	Sub XceedZip_OnDeleting (FileName As String)

For a description of the FileName$ parameter see the FileName Events topic.

OCX	VOID Deleting(PTR to String FileName)

For a description of the FileName parameter see the FileName Events topic.

Description

The Deleting event occurs once for each file that is about to be deleted from an archive as a result of executing the Delete method. The Deleting event occurs just before the file is deleted. A handler for the Deleting event has access to the filename of the file about to be deleted.


Deleting event Delphi example
Delphi example

A typical handler for the Deleting event, such as the one in this example, might simply change the caption of a label to display the name of the file now being deleted.

procedure TForm1.XceedZip1Deleting(XceedZip: TXceedZip; const FileName: String);

begin

  Label1.Caption := 'Deleting: ' + FileName;

end;


Deleting event C++Builder example
C++Builder example

A typical handler for the Deleting event, such as the one in this example, might simply change the caption of a label to display the name of the file now being deleted.

void __fastcall TForm1::XceedZip1Deleting(TXceedZip *XceedZip,	const AnsiString FileName)

{

  Label1->Caption = "Deleting: " + FileName;

}


Deleting event VB 3.0 example
VB 3.0 VBX example

A typical handler for the Deleting event, such as the one in this example, might simply change the caption of a label to display the name of the file now being deleted.

Sub XceedZip1_OnDeleting (FileName As String)

  Label1.Caption = "Deleting: " + FileName

End Sub


Deleting event VB 4.0 and 5.0 example
VB 4.0 and 5.0 OCX example

A typical handler for the Deleting event, such as the one in this example, might simply change the caption of a label to display the name of the file now being deleted.

Sub XceedZip1_OnDeleting (FileName As String)

  Label1.Caption = "Deleting: " + FileName

End Sub


Xceed Zip Extracting event
Extracting Event

Delphi example  C++Builder example  VB 3.0 example  VB 4.0 and 5.0 example

Declarations

Delphi	property OnExtracting: TXcdFileStatsEvent;

C++ Builder	__property TXcdFileStatsEvent OnExtracting;

VB 3.0	Sub XceedZip_OnExtracting (Filename As String, Size As Long, PSize As Long, Processed As Long, Attr As Integer, FTime As String, CRC As Long, Ratio As Integer, Completion As Integer, Method As Integer, Encrypted As Integer, Comment As String)

For a description of each parameter see the FileStats Events (VBX) topic.

OCX	VOID Extracting(PTR to String FileName, Long Size, Long PSize, Long Processed, Integer FileAttr, PTR to String FTime, Long CRC, Integer Ratio, Integer Completion, Integer Method, Integer Encrypted, Integer ComLen, PTR to String Comment)

For a description of each parameter see the FileStats Events (OCX) topic.

Description

The Extracting event occurs once for each file that is about to be extracted from an archive as a result of executing the Extract method. The Extracting event occurs just before the given file is uncompressed and written to the destination directory. A handler for the Extracting event has access to the files filename, compressed and uncompressed size, etc.


Extracting event Delphi example
Delphi example

A typical handler for the Extracting event, such as the one in this example, might add the name and uncompressed size of a file being extracted to a listbox. The listbox could later be scrolled through to view the list of extracted files.

procedure TForm1.XceedZip1Extracting(XceedZip: TXceedZip; const FileStats: TXcdFileStats);

begin

  Listbox1.Items.Add('Extracting: ' + FileStats.Name + ' (' +

    IntToStr(FileStats.Size) + ' bytes)');

end;


Extracting event C++Builder example
C++Builder example

A typical handler for the Extracting event, such as the one in this example, might add the name and uncompressed size of a file being extracted to a listbox. The listbox could later be scrolled through to view the list of extracted files.

void __fastcall TForm1::XceedZip1Extracting(TXceedZip *XceedZip,	const TXcdFileStats &FileStats)

{

  ListBox1->Items->Add("Extracting: " + FileStats.Name + " (" +

    IntToStr(FileStats.Size) + " bytes)");

}


Extracting event VB 3.0 example
VB 3.0 VBX example

A typical handler for the Extracting event, such as the one in this example, might add the name and uncompressed size of a file being extracted to a listbox. The listbox could later be scrolled through to view the list of extracted files.

Sub XceedZip1_OnExtracting (Filename As String, Size As Long, PSize As Long, Processed As Long, Attr As Integer, FTime As String, CRC As Long, Ratio As Integer, Completion As Integer, Method As Integer, Encrypted As Integer, Comment As String)

  List1.AddItem "Extracting: " + Filename + " (" +

    Trim$(Str$(Size)) + " bytes)"

End Sub


Extracting event VB 4.0 and 5.0 example
VB 4.0 and 5.0 OCX example

A typical handler for the Extracting event, such as the one in this example, might add the name and uncompressed size of a file being extracted to a listbox. The listbox could later be scrolled through to view the list of extracted files.

Sub XceedZip1_Extracting(FileName As String, ByVal Size As Long, ByVal PSize As Long, ByVal Processed As Long, ByVal Attr As Integer, FTime As String, ByVal CRC As Long, ByVal Ratio As Integer, ByVal Completion As Integer, ByVal Method As Integer, ByVal Encrypted As Integer, ByVal ComLen As Integer, Comment As String)

  List1.AddItem "Extracting: " + Filename + " (" +

    Trim$(Str$(Size)) + " bytes)"

End Sub


Xceed Zip FileComment event
FileComment Event

Delphi example  C++Builder example  VB 3.0 example  VB 4.0 and 5.0 example

Declarations

Delphi	property OnFileComment: TXcdFileCommentEvent;

C++ Builder	__property TXcdFileCommentEvent OnFileComment;

VB 3.0	Sub XceedZip_OnFileComment (FileName As String, Comment As String)

OCX	VOID FileComment(PTR to String FileName, PTR to Integer ComLen, PTR to String Comment)

Description

The FileComment event occurs once for each file that is about to be added to or updated in a zip file. This event occurs so that the comment for each individual file can be specified. Two parameters are passed to handlers of the FileComment event for the VBX and VCLs. For the VBX, they are FileName and Comment. In Delphi, the FileComment record contains the Name and Comment fields. The FileName parameter or Name field contains the name of the file for which the comment is required. The Comment parameter should be set to the appropriate comment string. For the OCX, you must also set the ComLen parameter to the length of the comment string.

If you do not wish to provide comments for certain files, do not modify the Comment (and ComLen, if applicable) parameter, it is already empty by default. If you do not wish to provide file comments at all, do not define a handler for the FileComment event.

Individual file comments can be up to 255 characters long, and can contain any ASCII characters, including nulls.

Comments can be retrieved by consulting the Comment parameter provided to the Listing event.


FileComment event Delphi example
Delphi example

A typical handler for the FileComment event, such as the one in this example, might simply provide comments for specific types of files, and perhaps a comment or two for specific files.

procedure TForm1.XceedZip1FileComment(XceedZip: TXceedZip; var FileComment: TXcdFileComment);

begin

  if (FileComment.Name = 'mdb.uue') then

    FileComment.Comment := 'The main database file encoded in 7 bits.';

  if (Copy(FileComment.Name,Length(FileComment.Name)-3,4) = '.bat') then

    FileComment.Comment := 'Do not mistake for an MS-DOS batch file!';

end;


FileComment event C++Builder example
C++Builder example

A typical handler for the FileComment event, such as the one in this example, might simply provide comments for specific types of files, and perhaps a comment or two for specific files.

void __fastcall TForm1::XceedZip1FileComment(TXceedZip *XceedZip, TXcdFileComment &FileComment)

{

  if (FileComment.Name == "mdb.uue")

    FileComment.Comment = "The main database file encoded in 7 bits.";

  if (FileComment.Name.SubString(FileComment.Name.Length()-3,4) == ".bat")

    FileComment.Comment = "Do not mistake for an MS-DOS batch file!";

}


FileComment event VB 3.0 example
VB 3.0 VBX example

A typical handler for the FileComment event, such as the one in this example might simply provide comments for specific types of files, and perhaps a comment or two for specific files.

Sub XceedZip1_OnFileComment (FileName As String, Comment As String)

  If FileName = "c:\temp\mdb.uue" Then

    Comment = "The main database file encoded in 7 bits."

  End If

  If Right$(FileName,4) = ".bat" Then

    Comment = "Do not mistake for an MS-DOS batch file!"

  End If

End Sub


FileComment event VB 4.0 and 5.0 example
VB 4.0 and 5.0 OCX example

A typical handler for the FileComment event, such as the one in this example might simply provide comments for specific types of files, and perhaps a comment or two for specific files.

Sub XceedZip1_FileComment(FileName As String, ComLen As Integer, Comment As String)

  If FileName = "c:\temp\mdb.uue" Then

    Comment = "The main database file encoded in 7 bits."

    ComLen = Len(Comment)

  End If

  If Right$(FileName, 4) = ".bat" Then

    Comment = "Do not mistake for an MS-DOS batch file!"

    ComLen = Len(Comment)

  End If

End Sub


Xceed Zip Fixing event
Fixing Event

Delphi example  C++Builder example  VB 3.0 example  VB 4.0 and 5.0 example

Declarations

Delphi	property OnFixing: TXcdFileNameEvent;

C++ Builder	__property TXcdFileNameEvent OnFixing;

VB 3.0	Sub XceedZip_OnFixing (FileName As String)

For a description of the FileName$ parameter see the FileName Events topic.

OCX	VOID Fixing(PTR to String FileName)

For a description of the FileName parameter see the FileName Events topic.

Description

The Fixing event occurs once for each file that is about to be fixed as a result of executing the Fix method. The Fixing event occurs just before the given file is read. A handler for the Fixing event has access to the filename of the file being fixed.


Fixing event Delphi example
Delphi example

A typical handler for the Fixing event, such as the one in this example, might simply change the caption of a label to display the name of the file currently being Fixed.

procedure TForm1.XceedZip1Fixing(XceedZip: TXceedZip; const FileName: String);

begin

  Label1.Caption := 'Fixing: ' + FileName;

end;


Fixing event C++Builder example
C++Builder example

A typical handler for the Fixing event, such as the one in this example, might simply change the caption of a label to display the name of the file currently being Fixed.

void __fastcall TForm1::XceedZip1Fixing(TXceedZip *XceedZip, const AnsiString FileName)

{

  Label1->Caption = "Fixing: " + FileName;

}


Fixing event VB 3.0 example
VB 3.0 VBX example

A typical handler for the Fixing event, such as the one in this example, might simply change the caption of a label to display the name of the file currently being Fixed.

Sub XceedZip1_OnFixing (FileName As String)

  Label1.Caption = "Fixing: " + FileName

End Sub


Fixing event VB 4.0 and 5.0 example
VB 4.0 and 5.0 OCX example

A typical handler for the Fixing event, such as the one in this example, might simply change the caption of a label to display the name of the file currently being Fixed.

Sub XceedZip1_Fixing(FileName As String)

  Label1.Caption = "Fixing: " + FileName

End Sub


Xceed Zip GlobalStatus event
GlobalStatus Event

Delphi example  C++Builder example  VB 3.0 example  VB 4.0 and 5.0 example

Declarations

Delphi	property OnGlobalStatus: TXcdGlobalStatsEvent;

C++ Builder	__property TXcdGlobalStatsEvent OnGlobalStatus;

VB 3.0	Sub XceedZip_OnGlobalStatus (TotalFiles As Integer, ProcessedFiles As Integer, CompletionFiles As Integer, TotalBytes As Long, ProcessedBytes As Long, CompletionBytes As Integer)

For a description of each parameter see the GlobalStats Events (VBX) topic.

OCX	VOID Status(Integer TotalFiles, Integer ProcessedFiles, Integer CompletionFiles, Long TotalBytes, Long ProcessedBytes, Integer CompletionBytes)

For a description of each parameter see the GlobalStats Events (OCX) topic.

Description

The GlobalStatus event occurs during the execution of the Add, Extract or Test methods to provide a status report for the general progress of the method. The GlobalStatus event will occur many times, at regular intervals, providing you with the total amount of files and bytes that the current method being executed has to process, the amount of files and bytes that have been processed so far, and the completion percentages based on files and bytes.

The Status event, as opposed to the GlobalStatus event, provides information on the current file being processed.


GlobalStatus event Delphi example
Delphi example

A typical handler for the GlobalStatus event, such as the one in this example, might simply update a gauge control to indicate the progress of the entire current add, extract or test operation

procedure TForm1.XceedZip1GlobalStatus(XceedZip: TXceedZip;

  const GlobalStats: TXcdGlobalStats);

begin

  Gauge1.Progress := GlobalStats.CompletionBytes;

end;


GlobalStatus event C++Builder example
C++Builder example

A typical handler for the GlobalStatus event, such as the one in this example, might simply update a gauge control to indicate the progress of the entire current add, extract or test operation

void __fastcall TForm1::XceedZip1GlobalStatus(TXceedZip *XceedZip, const TXcdGlobalStats &GlobalStats)

{

  ProgressBar1->Position = GlobalStats.CompletionBytes;

}


GlobalStatus event VB 3.0 example
VB 3.0 VBX example

A typical handler for the GlobalStatus event, such as the one in this example, might simply update a gauge control to indicate the progress of the entire current add, extract or test operation.

In this example, a label's caption is changed to show the percentage of completion.

Sub XceedZip1_OnGlobalStatus (TotalFiles As Long, ProcessedFiles As Long, CompletionFiles As Integer, TotalBytes As Long, ProcessedBytes As Long, CompletionBytes As Integer)

  Label1.Caption = Trim$(Str$(CompletionBytes)) + "% completed."

End Sub


GlobalStatus event VB 4.0 and 5.0 example
VB 4.0 and 5.0 OCX example

A typical handler for the GlobalStatus event, such as the one in this example, might simply update a gauge control to indicate the progress of the entire current add, extract or test operation.

In this example, a label's caption is changed to show the percentage of completion.

Sub XceedZip1_GlobalStatus(TotalFiles As Long, ProcessedFiles As Long, CompletionFiles As Integer, TotalBytes As Long, ProcessedBytes As Long, CompletionBytes As Integer)

  Label1.Caption = Str$(CompletionBytes) + "% completed."

End Sub


Xceed Zip Listing event
Listing Event

Delphi example  C++Builder example  VB 3.0 example  VB 4.0 and 5.0 example

Declarations

Delphi	property OnListing: TXcdFileStatsEvent;

C++ Builder	__property TXcdFileStatsEvent OnListing;

VB 3.0	Sub XceedZip_OnListing (Filename As String, Size As Long, PSize As Long, Processed As Long, Attr As Integer, FTime As String, CRC As Long, Ratio As Integer, Completion As Integer, Method As Integer, Encrypted As Integer, Comment As String)

For a description of each parameter see the FileStats Events (VBX) topic.

OCX	VOID Listing(PTR to String FileName, Long Size, Long PSize, Long Processed, Integer FileAttr, PTR to String FTime, Long CRC, Integer Ratio, Integer Completion, Integer Method, Integer Encrypted, Integer ComLen, PTR to String Comment)

For a description of each parameter see the FileStats Events (OCX) topic.

Description

The Listing event occurs once for each file that is listed in the archive file as a result of executing the List method. The only way to obtain the information provided by the List method is to write a handler for the Listing event.


Listing event Delphi example
Delphi example

The Listing event occurs only during the execution of the List method. A typical reason for executing the List method is to obtain information on files in an archive. The handler below displays, in a listbox, some of the available information on each file.

procedure TForm1.XceedZip1Listing(XceedZip: TXceedZip;

  const FileStats: TXcdFileStats);

begin

  ListBox1.Items.Add('Filename: ' + FileStats.Name);

  ListBox1.Items.Add('Uncompressed size: ' +

    IntToStr(FileStats.Size));

  ListBox1.Items.Add('Compressed size: ' +

    IntToStr(FileStats.PackedSize));

end;


Listing event C++Builder example
C++Builder example

The Listing event occurs only during the execution of the List method. A typical reason for executing the List method is to obtain information on files in an archive. The handler below displays, in a listbox, some of the available information on each file.

void __fastcall TForm1::XceedZip1Listing(TXceedZip *XceedZip,const TXcdFileStats &FileStats)

{

  ListBox1->Items->Add("Filename: " + FileStats.Name);

  ListBox1->Items->Add("Uncompressed size: " +

    IntToStr(FileStats.Size));

  ListBox1->Items->Add("Compressed size: " +

    IntToStr(FileStats.PackedSize));

}


Listing event VB 3.0 example
VB 3.0 VBX example

The Listing event occurs only during the execution of the List method. A typical reason for executing the List method is to obtain information on files in an archive. The handler below displays, in a listbox, some of the available information on each file.

Sub XceedZip1_OnListing (Filename As String, Size As Long, PSize As Long, Processed As Long, Attr As Integer, FTime As String, CRC As Long, Ratio As Integer, Completion As Integer, Method As Integer, Encrypted As Integer, Comment As String)

  List1.AddItem "Filename: " + Filename

  List1.AddItem "Uncompressed size: " + Trim$(Str$(Size))

  List1.AddItem "Compressed size: " + Trim$(Str$(PSize))

  If Len(Comment)>0 Then

    List1.AddItem "Comment: " + Trim$(Comment)

  Else

    List1.AddItem "Comment: None"

  End If

End Sub


Listing event VB 4.0 and 5.0 example
VB 4.0 and 5.0 OCX example

The Listing event occurs only during the execution of the List method. A typical reason for executing the List method is to obtain information on files in an archive. The handler below displays, in a listbox, some of the available information on each file.

Sub XceedZip1_Listing(FileName As String, ByVal Size As Long, ByVal PSize As Long, ByVal Processed As Long, ByVal Attr As Integer, FTime As String, ByVal CRC As Long, ByVal Ratio As Integer, ByVal Completion As Integer, ByVal Method As Integer, ByVal Encrypted As Integer, ByVal ComLen As Integer, Comment As String)

  List1.AddItem "Filename: " + Filename

  List1.AddItem "Uncompressed size: " + Trim$(Str$(Size))

  List1.AddItem "Compressed size: " + Trim$(Str$(PSize))

  If ComLen>0 Then

    List1.AddItem "Comment: " + Trim$(Comment)

  Else

    List1.AddItem "Comment: None"

  End If

End Sub


Xceed Zip Newdisk event
Newdisk Event

Delphi example  C++Builder example  VB 3.0 exampleVB 4.0 and 5.0 example

Declarations

Delphi	property OnNewdisk: TXcdNewdiskEvent;

C++ Builder	__property TXcdNewdiskEvent OnNewdisk

VB 3.0	Sub XceedZip_OnNewdisk (DiskNumber As Integer)

OCX	VOID Newdisk(Integer DiskNumber)

Description

The Newdisk event occurs when the Xceed Zip component is in MultidiskMode (see the MultidiskMode property topic) and a different disk is required to be inserted into the drive. The DiskNumber parameter contains the number of the disk to be inserted.

•	When adding files to an archive in MultidiskMode, as soon as all the free space on the first disk has been used up by the archive file, the Newdisk event will occur with the parameter DiskNumber = 2. When the second disk is filled, Newdisk occurs with the parameter DiskNumber = 3, and so on. Once the code you have written for the Newdisk event has completed, the component checks to see if a new disk was actually inserted. If a new disk was not swapped for a new one, the component will repeatedly generate the Newdisk event until a new disk has been inserted. If you do not write a handler for the Newdisk event, Xceed Zip will loop forever while waiting for a new disk.

Your application should inform the user to label each disk with the appropriate disk number as soon as it has been filled.

•	When extracting, testing or listing files in a multiple-disk archive, the Xceed Zip component does not know in advance the total number of disks that the archive file is spread across. Thus, when the Newdisk event occurs and the parameter DiskNumber = Lastdisk, your application should request the user to insert the last disk of the archive set. Once the last disk has been inserted, the component knows the total number of disks in the set, and starts requesting disks by number. If the requested disk is not inserted, the Newdisk event will be generated again, up to a maximum of 3 times, until the appropriate disk is inserted. If the maximum number of retries is reached, the XcdErrorWrongDisk result code will be returned by the Xceed Zip method being executed.


Newdisk event Delphi example
Delphi example

The Newdisk event handler below displays a message box indicating that the proper disk must be inserted into the drive. It also allows the user to abort the entire operation.

procedure TForm1.XceedZip1Newdisk(XceedZip: TXceedZip;

  const Disknumber: Integer);

var

  response: Word;

begin

  if (Disknumber = 0) then

    response := MessageDlg('Please insert the last disk of the set.',

    mtConfirmation, [mbOK, mbCancel], 0)

  else

    response := MessageDlg('Please insert disk #' + IntToStr(Disknumber)

    + ' of the set.', mtConfirmation, [mbOK, mbCancel], 0);

  if (response = mbCancel) then XceedZip.Abort := True;

end;


Newdisk event C++Builder example
C++Builder example

The Newdisk event handler below displays a message box indicating that the proper disk must be inserted into the drive. It also allows the user to abort the entire operation.

void __fastcall TForm1::XceedZip1Newdisk(TXceedZip *XceedZip,	const int Disknumber)

{

  int response;

  AnsiString Message;

  if (Disknumber == 0)

    Message = "Please insert the last disk of the set.";

  else

    Message = "Please insert disk #" + IntToStr(Disknumber) +

              " of the set.";

  response = Application->MessageBox(Message.c_str(),

             "Confirmation", MB_OKCANCEL);

if (response == ID_CANCEL)

  XceedZip->Abort = True;

}


Newdisk event VB 3.0 example
VB 3.0 VBX example

The Newdisk event handler below displays a message box indicating that the proper disk must be inserted into the drive. It also allows the user to abort the entire operation.

Sub XceedZip1_OnNewdisk (DiskNumber As Integer)

  Dim UserAnswer As Integer

  If (DiskNumber = Lastdisk) then

    MsgBox "Please insert the last disk of the set.", MB_OKCANCEL

  Else

    MsgBox "Please insert disk #" + Trim$(Str$(DiskNumber)) + " of the set.", MB_OKCANCEL

  End if

  If (UserAnswer = ID_CANCEL) then XceedZip1.Abort = True

End Sub


Newdisk event VB 4.0 and 5.0 example
VB 4.0 and 5.0 OCX example

The Newdisk event handler below displays a message box indicating that the proper disk must be inserted into the drive. It also allows the user to abort the entire operation.

Sub XceedZip1_Newdisk(ByVal DiskNumber As Integer)

  Dim UserAnswer As Integer

  If (DiskNumber = Lastdisk) then

    MsgBox "Please insert the last disk of the set.", VbOkCancel

  Else

    MsgBox "Please insert disk #" + Trim$(Str$(DiskNumber)) + " of the set.", VbOkCancel

  End if

  If (UserAnswer = vbCancel) then XceedZip1.Abort = True

End Sub


Xceed Zip PwdQuery event
PwdQuery Event

Delphi example  C++Builder example  VB 3.0 example  VB 4.0 and 5.0 example

Declarations

Delphi	property OnPwdQuery: TXcdPwdQueryEvent;

C++ Builder	__property TXcdPwdQueryEvent OnPwdQuery;

VB 3.0	Sub XceedZip_OnPwdQuery (FileName As String, Password As String, Cmd As Integer)

For a description of each parameter see the PwdQuery Event type topic.

OCX	VOID PwdQuery(PTR to String FileName, PTR to String Password, PTR to Integer Cmd)

For a description of each parameter see the PwdQuery Event type topic.

Description

The PwdQuery event exists as a more flexible method of providing passwords to add, extract or test encrypted files in an archive. If all files in an archive are encrypted, or are going to be encrypted with the same password, the Password property should be used to provide the password. When the Password property is used, the PwdQuery event is disabled and does not occur. In order to be capable of providing a different password for each file, the Password property must be left empty. In this case, the PwdQuery event will be used to provide passwords to encrypt and decrypt files.

When adding files, the PwdQuery event will occur for each file being added or updated in the archive. When extracting files, the PwdQuery event occurs in the following two circumstances: 1. The first time an encrypted file is encountered in the current archive. 2. Every time an encrypted file is encountered which requires a different password than the previous encrypted file.

When adding files, a handler written for the PwdQuery event may supply a new password for the current file being added. When extracting, a handler written for the PwdQuery event may supply a new decryption password, specify that the current encrypted file should be skipped or specify that the current encrypted file, and all subsequent encrypted files, should be skipped.

When extracting, if no handler is written for the PwdQuery, encrypted files will not be extracted or tested. If an incorrect password is supplied, the PwdQuery will re-occur until either the correct password is supplied, or the command is issued to skip the current file being extracted.

Note that the SkippingFile event occurs for any encrypted files that are skipped due to an invalid password or if Xceed Zip is instructed to skip the current file being extracted.


PwdQuery event Delphi example
Delphi example

A typical handler for the PwdQuery event (when extracting files) will prompt the user for a password whenever the PwdQuery event occurs. Generally, the following steps should be taken to create a handler for the PwdQuery event:

1. Provide the user with the filename of the encrypted file for which a password is required. The following code is from a handler for PwdQuery that assigns the filename to the string Fname:

procedure TForm1.XceedZip1PwdQuery(XceedZip: TXceedZip; var PwdQuery: TXcdPwdQuery);

var

  Fname: String;

begin

  Fname := PwdQuery.Name;

  ...

2. Create a dialog box to prompt the user to enter the password, or to allow the user to choose to skip the file or to skip all encrypted files from now on.

3. The final step is one of the following three possibilities:

  A. If the user has supplied a password, set it using the following code:

    PwdQuery.Password := { String containing the password };

    Then Inform the component that a new password is being supplied:

    PwdQuery.Command := xpcNew;

  B. If the user chose to skip the file, inform the component to skip the present encrypted file:

    PwdQuery.Command := xpcSkip;

  C. If the user chose to skip all encrypted files from now on, use:

    PwdQuery.Command := xpcAlwaysSkip;


PwdQuery event C++Builder example
C++Builder example

A typical handler for the PwdQuery event (when extracting files) will prompt the user for a password whenever the PwdQuery event occurs. Generally, the following steps should be taken to create a handler for the PwdQuery event:

1. Provide the user with the filename of the encrypted file for which a password is required. The following code is from a handler for PwdQuery that assigns the filename to the string Fname:

void __fastcall TForm1::XceedZip1PwdQuery(TXceedZip *XceedZip, TXcdPwdQuery &PwdQuery)

{

  AnsiString Fname;

  Fname = PwdQuery.Name;

  ...

2. Create a dialog box to prompt the user to enter the password, or to allow the user to choose to skip the file or to skip all encrypted files from now on.

3. The final step is one of the following three possibilities:

  A. If the user has supplied a password, set it using the following code:

    PwdQuery.Password = { String containing the password };

    Then Inform the component that a new password is being supplied:

    PwdQuery.Command = xpcNew;

  B. If the user chose to skip the file, inform the component to skip the present encrypted file:

    PwdQuery.Command = xpcSkip;

  C. If the user chose to skip all encrypted files from now on, use:

    PwdQuery.Command = xpcAlwaysSkip;


PwdQuery event VB 3.0 example
VB 3.0 VBX example

A typical handler for the PwdQuery event (when extracting files) will prompt the user for a password whenever the PwdQuery event occurs. Generally, the following steps should be taken to create a handler for the PwdQuery event:

1. Provide the user with the filename of the encrypted file for which a password is required. The following code is from a handler for PwdQuery that assigns the filename to the string Fname:

Sub XceedZip1_OnPwdQuery (FileName As String, Password As String, Cmd As Integer)

  Dim Fname As String

  Fname = FileName

  ...

2. Create a dialog box to prompt the user to enter the password, or to allow the user to choose to skip the file or to skip all encrypted files from now on.

3. The final step is one of the following three possibilities:

  A. If the user has supplied a password, set it using the following code:

    Password = "String containing the password"

    Then Inform the component that a new password is being supplied:

    Cmd = xpcNew

  B. If the user chose to skip the file, inform the component to skip the present encrypted file:

    Cmd = xpcSkip

  C. If the user chose to skip all encrypted files from now on, use:

    Cmd = xpcAlwaysSkip


PwdQuery event VB 4.0 and 5.0 example
VB 4.0 and 5.0 OCX example

A typical handler for the PwdQuery event (when extracting files) will prompt the user for a password whenever the PwdQuery event occurs. Generally, the following steps should be taken to create a handler for the PwdQuery event:

1. Provide the user with the filename of the encrypted file for which a password is required. The following code is from a handler for PwdQuery that assigns the filename to the string Fname:

Sub XceedZip1_PwdQuery(FileName As String, Password As String, Cmd As Integer)

  Dim Fname As String

  Fname = FileName

  ...

2. Create a dialog box to prompt the user to enter the password, or to allow the user to choose to skip the file or to skip all encrypted files from now on.

3. The final step is one of the following three possibilities:

  A. If the user has supplied a password, set it using the following code:

    Password = "String containing the password"

    Then Inform the component that a new password is being supplied:

    Cmd = xpcNew

  B. If the user chose to skip the file, inform the component to skip the present encrypted file:

    Cmd = xpcSkip

  C. If the user chose to skip all encrypted files from now on, use:

    Cmd = xpcAlwaysSkip


Xceed Zip Rename event
Rename Event

Delphi example  C++Builder example  VB 3.0 example  VB 4.0 and 5.0 example

Declarations

Delphi	property OnRename: TXcdRenameEvent;

C++ Builder	__property TXcdRenameEvent OnRename;

VB 3.0	Sub XceedZip_OnRename (OrigName As String, NewName As String)

For a description of each parameter see the Rename Event type topic.

OCX	VOID Rename(PTR to String OrigName, PTR to String NewName)

For a description of each parameter see the Rename Event type topic.

Description

The Rename event occurs whenever a file is being added or extracted from a Zip file. When adding files, the Rename event lets you change the path and filenames stored inside the Zip file. When extracting files, the Rename event lets you change the path and filename of the file right before it is extracted.

It is not recommended to add the drive specification (for example D:\) to the path and filename when renaming files you are adding to a Zip file. This will render the file unextractable by most unzipping applications and by Xceed Zip, because when extracting files, the destination drives specification is already prepended to the path and filename of each file being extracted.

The Rename event occurs before the Adding or Extracting events.


Rename event Delphi example
Delphi example

A typical handler for the Rename event will make the same changes for all files being added or extracted from an archive. For example, paths might be altered or file extensions might be modified or added. The following code adds a .BAK extension to all extracted files. The example assumes that the files being extracted dont already have a file extension.

procedure TForm1.XceedZip1Rename(XceedZip: TXceedZip; var Rename: TXcdRename);

begin

  Rename.NewName := Rename.OrigName + '.BAK';

end;


Rename event C++Builder example
C++Builder example

A typical handler for the Rename event will make the same changes for all files being added or extracted from an archive. For example, paths might be altered or file extensions might be modified or added. The following code adds a .BAK extension to all extracted files. The example assumes that the files being extracted dont already have a file extension.

void __fastcall TForm1::XceedZip1Replace(TXceedZip *XceedZip, TXcdRenamce &Rename)

{

  Rename.NewName = Rename.OrigName + ".BAK";

}


Rename event VB 3.0 example
VB 3.0 VBX example

A typical handler for the Rename event will make the same changes for all files being added or extracted from an archive. For example, paths might be altered or file extensions might be modified or added. The following code adds a .BAK extension to all extracted files. The example assumes that the files being extracted dont already have a file extension.

Sub XceedZip1_OnRename (OrigName As String, NewName As String)

  NewName = OrigName + ".BAK"

End Sub


Rename event VB 4.0 and 5.0 example
VB 4.0 and 5.0 OCX example

A typical handler for the Rename event will make the same changes for all files being added or extracted from an archive. For example, paths might be altered or file extensions might be modified or added. The following code adds a .BAK extension to all extracted files. The example assumes that the files being extracted dont already have a file extension.

Sub XceedZip1_Rename(OrigName As String, NewName As String)

  NewName = OrigName + ".BAK"

End Sub


Xceed Zip Replace event
Replace Event

Delphi example  C++Builder example  VB 3.0 example  VB 4.0 and 5.0 example

Declarations

Delphi	property OnReplace: TXcdReplaceEvent;

C++ Builder	__property TXcdReplaceEvent OnReplace;

VB 3.0	Sub XceedZip_OnReplace (OrigName As String, NewName As String, Cmd As Integer)

For a description of each parameter see the Replace Event type topic.

OCX	VOID Replace(PTR to String OrigName, PTR to String NewName, PTR to Integer Cmd)

For a description of each parameter see the Replace Event type topic.

Description

When the Overwrite property is set to xowAsk, the Replace event is enabled, and occurs whenever a file about to be extracted already exists in the destination directory. The Replace event allows the handler to specify an action to be taken for that file and possibly for all subsequent files to be extracted.

To avoid writing a handler for the Replace event, the Overwrite property may be set to xowAlways to always replace files, or xowNever to never replace files. With either of these settings, the Replace event is disabled and will not occur.

If a handler is not written for the Replace event when Overwrite is set to xowAsk, no files already existing will be replaced.


Replace event Delphi example
Delphi example

A typical handler for the Replace event might open a dialog box to prompt the user to decide what to do with a file that will be replaced. In this example, a message box is shown containing the filename of the file that will be replaced. The user can then chose to replace or not to have the file be replaced, or to abort the whole operation.

procedure TForm1.XceedZip1Replace(XceedZip: TXceedZip; var Replace: TXcdReplace);

var

  UserAnswer: Word;

begin

  UserAnswer := MessageDlg('The file "' + Replace.OrigName +

    '" already exists. Do you want to replace this file?',

    mtConfirmation, [mbYes,mbNo,mbAbort], 0);

  if UserAnswer = mrYes then

    Replace.Command := xrcReplace

  else if UserAnswer = mrNo then

    Replace.Command := xrcSkip

  else

    XceedZip.Abort := True;

end;


Replace event C++Builder example
C++Builder example

A typical handler for the Replace event might open a dialog box to prompt the user to decide what to do with a file that will be replaced. In this example, a message box is shown containing the filename of the file that will be replaced. The user can then chose to replace or not to have the file be replaced, or to abort the whole operation.

void __fastcall TForm1::XceedZip1Replace(TXceedZip *XceedZip, TXcdReplace &Replace)

{

  int UserAnswer;

  AnsiString Message;

  Message = "The file '" + Replace.OrigName + "' already exists.

             Do you want to replace this file?";

  UserAnswer = Application->MessageBox(Message.c_str(),

                            "Confirmation", MB_OKCANCEL);

  if (UserAnswer == ID_YES)

    Replace.Command = xrcReplace;

  else

    if (UserAnswer == ID_NO)

      Replace.Command = xrcSkip;

    else

      XceedZip->Abort = True;

}


Replace event VB 3.0 example
VB 3.0 VBX example

A typical handler for the Replace event might open a dialog box to prompt the user to decide what to do with a file that will be replaced. In this example, a message box is shown containing the filename of the file that will be replaced. The user can then chose to replace or not to have the file be replaced, or to abort the whole operation.

Sub XceedZip1_OnReplace (OrigName As String, NewName As String, Cmd As Integer)

  Dim UserAnswer As Integer

  Const MB_YESNOCANCEL = 3

  Const IDYES = 6

  Const IDNO = 7

  Const IDCANCEL = 2

  UserAnswer = MsgBox("The file " + OrigName +

    " already exists. Do you want to replace this file?",

    MB_YESNOCANCEL, "Replace file")

  If UserAnswer = IDYES Then

    Cmd = xrcReplace

  ElseIf UserAnswer = IDNO Then

    Cmd = xrcSkip

  Else

    XceedZip1.Abort = True

  End If

End Sub


Replace event VB 4.0 and 5.0 example
VB 4.0 and 5.0 OCX example

A typical handler for the Replace event might open a dialog box to prompt the user to decide what to do with a file that will be replaced. In this example, a message box is shown containing the filename of the file that will be replaced. The user can then chose to replace or not to have the file be replaced, or to abort the whole operation.

Sub XceedZip1_Replace(OrigName As String, NewName As String, Cmd As Integer)

  Dim UserAnswer As Integer

  UserAnswer = MsgBox("The file " + OrigName +

    " already exists. Do you want to replace this file?",

    VbYesNoCancel, "Replace file")

  If UserAnswer = vbYes Then

    Cmd = xrcReplace

  ElseIf UserAnswer = vbNo Then

    Cmd = xrcSkip

  Else

    XceedZip1.Abort = True

  End If

End Sub


Xceed Zip SkippingFile event
SkippingFile Event

Delphi example  C++Builder example  VB 3.0 example  VB 4.0 and 5.0 example

Declarations

Delphi	property OnSkippingFile: TXcdSkippingEvent;

C++ Builder	__property TXcdSkippingEvent OnSkippingFile;

VB 3.0	Sub XceedZip_OnSkippingFile (FileName As String, Reason As Integer)

For a description of each parameter see the SkippingFile Event type topic.

OCX	VOID SkippingFile(PTR to String FileName, Integer Reason)

For a description of each parameter see the SkippingFile Event type topic.

Description

The SkippingFile event occurs whenever a file cannot be processed during the execution of one the following methods: Add, Delete, Extract, or List. It also occurs during the execution of the Test method whenever a file fails the test or cannot be tested. A handler for the SkippingFile event has access to the filename of the file being skipped, and also has access to a variable indicating the reason for skipping the file.

This event is useful if you want to know which file(s) are skipped, and why. The information provided by the SkippingFile event can be displayed on the screen, put into a log file, or completely ignored. If you do not write a handler for the SkippingFile event, your application will still be notified if any files are skipped because the method currently executing will return a result code of either XcdWarningFilesSkipped or XcdErrorNothingToDo.

Tips

The sample applications for VB, Delphi and C++Builder include a handler for the SkippingFile event which displays a message box indicating which file is being skipped and the reason for skipping the file. You can copy the SkippingFile event handler from the sample application directly into your own application if desired, so you wont have to write any code for SkippingFile.


SkippingFile event Delphi example
Delphi example

A typical handler for the Skipping event might note skipped files in a log file, or simply inform the user that a file is being skipped with a message box, as in this example:

procedure TForm1.XceedZip1SkippingFile(XceedZip: TXceedZip;

  const Skipping: TXcdSkipping);

var

  SkipMsg: String;

  Fname: String;

begin

  Fname := Skipping.Name;

  case Skipping.Reason of

    xsrFileNotFound:

      SkipMsg := 'File not found: "'+Fname+'".';

    xsrBadVersion:

      SkipMsg := 'Skipping file: "' + Fname + '", it is ' +

        'compressed with an unknown compression method.';

    xsrBadCrc:

      SkipMsg := 'File "' + Fname + '" has a bad CRC. ' +

        'Skipping this file.';

    xsrUpToDate:

      SkipMsg := 'Not updating file "' + Fname + '", it ' +

        'is already up to date.';

    xsrUnableToOpen:

      SkipMsg := 'Unable to open file "' + Fname + '". ' +

        'Skipping this file.';

    xsrBadPassword:

      SkipMsg := 'Invalid/No password for encrypted file "' +

        Fname + '". Skipping this file.';

    xsrBadData:

      SkipMsg := 'File "' + Fname + '" is corrupted. ' +

        'Skipping this file.';

  end;

  MessageDlg(SkipMsg, mtWarning, [mbOK], 0);

end;


SkippingFile event C++Builder example
C++Builder example

A typical handler for the Skipping event might note skipped files in a log file, or simply inform the user that a file is being skipped with a message box, as in this example:

void __fastcall TForm1::XceedZip1SkippingFile(TXceedZip *XceedZip, const TXcdSkipping &Skipping)

{

  AnsiString SkipMsg;

  AnsiString Fname;

  Fname = Skipping.Name;

  switch (Skipping.Reason) {

    xsrFileNotFound:

      SkipMsg = "File not found: '" + Fname + "'.";

    xsrBadVersion:

      SkipMsg = "Skipping file: '" + Fname + "', it is " +

                "compressed with an unknown compression method.";

    xsrBadCrc:

      SkipMsg = "File '" + Fname + "' has a bad CRC. " +

                "Skipping this file.";

    xsrUpToDate:

      SkipMsg = "Not updating file '" + Fname + "', it " +

                "is already up to date.";

    xsrUnableToOpen:

      SkipMsg = "Unable to open file '" + Fname + "'. " +

                "Skipping this file.";

    xsrBadPassword:

      SkipMsg = "Invalid/No password for encrypted file '" + Fname +

                "'. Skipping this file.";

    xsrBadData:

      SkipMsg = "File '" + Fname + "' is corrupted. " +

                "Skipping this file.";

  }

  Application->MessageBox(SkipMsg.c_str(), "Warning", MB_OK);

}


SkippingFile event VB 3.0 example
VB 3.0 VBX example

A typical handler for the Skipping event might note skipped files in a log file, or simply inform the user that a file is being skipped with a message box, as in this example:

Sub XceedZip1_OnSkippingFile (FileName As String, Reason As Integer)

  Dim SkipMsg As String

  Dim Fname As String

  Fname = FileName

  Select Case Reason

    Case xsrFileNotFound

      SkipMsg = "File not found: '" + Fname + "'"

    Case xsrBadVersion

      SkipMsg = "Skipping file: '" + Fname + "', it is " +

        "compressed with an unknown compression method."

    Case xsrBadCrc

      SkipMsg = "File '" + Fname + "' has a bad CRC. " +

        "Skipping this file."

    Case xsrUpToDate

      SkipMsg = "Not updating file '" + Fname + "', it " +

        "is already up to date."

    Case xsrUnableToOpen

      SkipMsg = "Unable to open file '" + Fname + "'. " +

        "Skipping this file."

    Case xsrBadPassword

      SkipMsg = "Invalid or no password for encrypted file '" + Fname +

        "'. Skipping this file."

    Case xsrBadData

      SkipMsg = "File '" + Fname + "' is corrupted. " +

        "Skipping this file."

  End Select

  MsgBox SkipMsg, 0, "Error processing file"

End Sub


SkippingFile event VB 4.0 and 5.0 example
VB 4.0 and 5.0 OCX example

A typical handler for the Skipping event might note skipped files in a log file, or simply inform the user that a file is being skipped with a message box, as in this example:

Sub XceedZip1_SkippingFile(FileName As String, ByVal Reason As Integer)

  Dim SkipMsg As String

  Dim Fname As String

  Fname = FileName

  Select Case Reason

    Case xsrFileNotFound

      SkipMsg = "File not found: '" + Fname + "'"

    Case xsrBadVersion

      SkipMsg = "Skipping file: '" + Fname + "', it is " +

        "compressed with an unknown compression method."

    Case xsrBadCrc

      SkipMsg = "File '" + Fname + "' has a bad CRC. " +

        "Skipping this file."

    Case xsrUpToDate

      SkipMsg = "Not updating file '" + Fname + "', it " +

        "is already up to date."

    Case xsrUnableToOpen

      SkipMsg = "Unable to open file '" + Fname + "'. " +

        "Skipping this file."

    Case xsrBadPassword

      SkipMsg = "Invalid or no password for encrypted file '" + Fname +

        "'. Skipping this file."

    Case xsrBadData

      SkipMsg = "File '" + Fname + "' is corrupted. " +

        "Skipping this file."

  End Select

  MsgBox SkipMsg, 0, "Error processing file"

End Sub


Xceed Zip Status event
Status Event

Delphi example  C++Builder example  VB 3.0 example  VB 4.0 and 5.0 example

Declarations

Delphi	property OnStatus: TXcdFileStatsEvent;

C++ Builder	__property TXcdFileStatsEvent OnStatus;

VB 3.0	Sub XceedZip_OnStatus (Filename As String, Size As Long, PSize As Long, Processed As Long, Attr As Integer, FTime As String, CRC As Long, Ratio As Integer, Completion As Integer, Method As Integer, Encrypted As Integer, Comment As String)

For a description of each parameter see the FileStats Events (VBX) topic.

OCX	VOID Status(PTR to String FileName, Long Size, Long PSize, Long Processed, Integer FileAttr, PTR to String FTime, Long CRC, Integer Ratio, Integer Completion, Integer Method, Integer Encrypted, Integer ComLen, PTR to String Comment)

For a description of each parameter see the FileStats Events (OCX) topic.

Description

The Status event occurs during the execution of the Add, Extract or Test methods to provide a status report for the processing of a given file. The Status event occurs only after some processing has been done on a file since the first Adding, Extracting, Testing or Updating event for that file has occurred. For large files, the Status event will occur many times, at regular intervals.

A handler for Status has access to information such as the file size, the amount of bytes processed so far, the percentage of completion for the current file being processed, etc.

In Delphi, to determine whether a file has been completely processed, compare the Size and BytesProcessed fields provided to the handler through the FileStats parameter. For users of the VBX or OCX, compare the Size and Processed parameters passed to the handler. If they are equal, then processing of the current file is complete and no more Status events will occur for it.


Status event Delphi example
Delphi example

A typical handler for the Status event, such as the one in this example, might simply update a gauge control to indicate the progress of the file currently being processed. Note: It is a good idea to reset the gauge during an Adding, Updating, Extracting or Testing event, since these events indicate that a new file is being processed.

procedure TForm1.XceedZip1Status(XceedZip: TXceedZip;

  const FileStats: TXcdFileStats);

begin

    Gauge1.Progress := FileStats.Completion;

end;


Status event C++Builder example
C++Builder example

A typical handler for the Status event, such as the one in this example, might simply update a progress bar control to indicate the progress of the file currently being processed. Note: It is a good idea to reset the progress bar during an Adding, Updating, Extracting or Testing event, since these events indicate that a new file is being processed.

void __fastcall TForm1::XceedZip1Status(TXceedZip *XceedZip, const TXcdFileStats &FileStats)

{

  ProgressBar1->Position = FileStats.Completion;

}


Status event VB 3.0 example
VB 3.0 VBX example

A typical handler for the Status event, like the one in Xceed's demo application, might simply update a gauge control to indicate the progress of the file currently being processed. Note: It is a good idea to reset the gauge during an Adding, Updating, Extracting or Testing event, since these events indicate that a new file is being processed.

In this example, a label's caption is changed to show the percentage of completion.

Sub XceedZip1_OnStatus (Filename As String, Size As Long, PSize As Long, Processed As Long, Attr As Integer, FTime As String, CRC As Long, Ratio As Integer, Completion As Integer, Method As Integer, Encrypted As Integer, Comment As String)

  Label1.Caption = Trim$(Str$(Completion)) + "% completed."

End Sub


Status event VB 4.0 and 5.0 example
VB 4.0 and 5.0 OCX example

A typical handler for the Status event, like the one in Xceed's demo application, might simply update a gauge control to indicate the progress of the file currently being processed. Note: It is a good idea to reset the gauge during an Adding, Updating, Extracting or Testing event, since these events indicate that a new file is being processed.

In this example, a label's caption is changed to show the percentage of completion.

Sub XceedZip1_Status(FileName As String, ByVal Size As Long, ByVal PSize As Long, ByVal Processed As Long, ByVal Attr As Integer, FTime As String, ByVal CRC As Long, ByVal Ratio As Integer, ByVal Completion As Integer, ByVal Method As Integer, ByVal Encrypted As Integer, ByVal ComLen As Integer, Comment As String)

  Label1.Caption = Str$(Completion) + "% completed."

End Sub


Xceed Zip Testing event
Testing Event

Delphi example  C++Builder example  VB 3.0 example  VB 4.0 and 5.0 example

Declarations

Delphi	property OnTesting: TXcdFileStatsEvent;

C++ Builder	__property TXcdFileStatsEvent OnTesting;

VB 3.0	Sub XceedZip_OnTesting (Filename As String, Size As Long, PSize As Long, Processed As Long, Attr As Integer, FTime As String, CRC As Long, Ratio As Integer, Completion As Integer, Method As Integer, Encrypted As Integer, Comment As String)

For a description of each parameter see the FileStats Events topic.

OCX	VOID Testing(PTR to String FileName, Long Size, Long PSize, Long Processed, Integer FileAttr, PTR to String FTime, Long CRC, Integer Ratio, Integer Completion, Integer Method, Integer Encrypted, Integer ComLen, PTR to String Comment)

For a description of each parameter see the FileStats Events (OCX) topic.

Description

The Testing event occurs once for each file that is about to be tested in an archive as a result of executing the Test method. The Testing event occurs just before the given file is tested. A handler for the Testing event has access to the files filename, compressed and uncompressed size, etc.


Testing event Delphi example
Delphi example

A typical handler for the Testing event, such as the one in this example, might simply change the caption of a label to display the name of the file being tested, and its compressed size.

procedure TForm1.XceedZip1Testing(XceedZip: TXceedZip; const FileStats: TXcdFileStats);

begin

  Label1.Caption := 'Testing file: ' + FileStats.Name + ' (' +

    IntToStr(FileStats.PackedSize) + ' bytes, compressed)';

end;


Testing event C++Builder example
C++Builder example

A typical handler for the Testing event, such as the one in this example, might simply change the caption of a label to display the name of the file being tested, and its compressed size.

void __fastcall TForm1::XceedZip1Testing(TXceedZip *XceedZip, const TXcdFileStats &FileStats)

{

  Label1->Caption = "Testing file: " + FileStats.Name + " (" +

          IntToStr(FileStats.PackedSize) + " bytes, compressed)";

}


Testing event VB 3.0 example
VB 3.0 VBX example

A typical handler for the Testing event, such as the one in this example, might simply change the caption of a label to display the name of the file being tested, and its compressed size.

Sub XceedZip1_OnTesting (Filename As String, Size As Long, PSize As Long, Processed As Long, Attr As Integer, FTime As String, CRC As Long, Ratio As Integer, Completion As Integer, Method As Integer, Encrypted As Integer, Comment As String)

  Label1.Caption = "Testing file: " + Filename + " (" +

    Str$(PSize) + " bytes, compressed)"

End Sub


Testing event VB 4.0 and 5.0 example
VB 4.0 and 5.0 OCX example

A typical handler for the Testing event, such as the one in this example, might simply change the caption of a label to display the name of the file being tested, and its compressed size.

Sub XceedZip1_Testing(FileName As String, ByVal Size As Long, ByVal PSize As Long, ByVal Processed As Long, ByVal FileAttr As Integer, FTime As String, ByVal CRC As Long, ByVal Ratio As Integer, ByVal Completion As Integer, ByVal Method As Integer, ByVal Encrypted As Integer, ByVal ComLen As Integer, Comment As String)

  Label1.Caption = "Testing file: " + Filename + " (" +

    Str$(PSize) + " bytes, compressed)"

End Sub


Xceed Zip Updating event
Updating Event

Delphi example  C++Builder example  VB 3.0 example  VB 4.0 and 5.0 example

Declarations

Delphi	property OnUpdating: TXcdFileStatsEvent;

C++ Builder	__property TXcdFileStatsEvent OnUpdating;

VB 3.0	Sub XceedZip_OnUpdating (Filename As String, Size As Long, PSize As Long, Processed As Long, Attr As Integer, FTime As String, CRC As Long, Ratio As Integer, Completion As Integer, Method As Integer, Encrypted As Integer, Comment As String)

For a description of each parameter see the FileStats Events (VBX) topic.

OCX	VOID Updating(PTR to String FileName, Long Size, Long PSize, Long Processed, Integer FileAttr, PTR to String FTime, Long CRC, Integer Ratio, Integer Completion, Integer Method, Integer Encrypted, Integer ComLen, PTR to String Comment)

For a description of each parameter see the FileStats Events (OCX) topic.

Description

The Updating event occurs once for each file that is about to be replaced in an archive as a result of executing the Add method. The difference between an Updating event and an Adding event is that with the Updating event, the file being stored or compressed already exists in the archive. The Updating event occurs just before compression or storage of the given file takes place. A handler for the Updating event has access to the files filename, uncompressed size, etc.


Updating event Delphi example
Delphi example

A typical handler for the Updating event, such as the one in this example, might simply change the caption of a label to display the name of the file currently being added.

procedure TForm1.XceedZip1Updating(XceedZip: TXceedZip; const FileStats: TXcdFileStats);

begin

  Label1.Caption := 'Updating file: ' + FileStats.Name;

end;


Updating event C++Builder example
C++Builder example

A typical handler for the Updating event, such as the one in this example, might simply change the caption of a label to display the name of the file currently being added.

void __fastcall TForm1::XceedZip1Updating(TXceedZip *XceedZip, const TXcdFileStats &FileStats)

{

  Label1->Caption = "Updating file: " + FileStats.Name;

}


Updating event VB 3.0 example
VB 3.0 VBX example

A typical handler for the Updating event, such as the one in this example, might simply change the caption of a label to display the name of the file currently being added.

Sub XceedZip1_OnUpdating (Filename As String, Size As Long, PSize As Long, Processed As Long, Attr As Integer, FTime As String, CRC As Long, Ratio As Integer, Completion As Integer, Method As Integer, Encrypted As Integer, Comment As String)

  Label1.Caption = "Updating file: " + FileName

End Sub


Updating event VB 4.0 and 5.0 example
VB 4.0 and 5.0 OCX example

A typical handler for the Updating event, such as the one in this example, might simply change the caption of a label to display the name of the file currently being added.

Sub XceedZip1_Updating(FileName As String, ByVal Size As Long, ByVal PSize As Long, ByVal Processed As Long, ByVal FileAttr As Integer, FTime As String, ByVal CRC As Long, ByVal Ratio As Integer, ByVal Completion As Integer, ByVal Method As Integer, ByVal Encrypted As Integer, ByVal ComLen As Integer, Comment As String)

  Label1.Caption = "Updating file: " + FileName

End Sub


Xceed Zip Delphi and C++Builder Types
TXceedZip Types

The following types are available in the XceedZip Delphi and C++Builder units, and fall into three categories: The Event types, the Event parameter types and the Enumerated types. Event types are the types for the events that the Xceed Zip component can generate. The Event parameter types are the types for parameters that are passed to the handlers of these events. The Enumerated types are the types for various fields used in Event parameter types, properties and commands.

Event types

• TXcdFileCommentEvent • TXcdFileNameEvent • TXcdFileStatsEvent • TXcdGlobalStatsEvent	• TXcdNewdiskEvent • TXcdPwdQueryEvent • TXcdReplaceEvent • TXcdSkippingEvent
Event parameter types

• TXcdFileComment • TXcdFileStats • TXcdGlobalStats • TXcdPwdQuery	• TXcdPwdQuery • TXcdReplace • TXcdSkipping
Enumerated types

• TXcdCommand • TXcdCompressionLevel • TXcdReplaceCommand • TXcdFileAttr • TXcdOverwrite • TXcdPwdQueryCommand	• TXcdSfxButton • TXcdSfxPrompt • TXcdSfxString • TXcdSfxMessage • TXcdSkippingReason


Xceed Zip TXcdCommand type
TXcdCommand Type

Unit

XceedZip

Delphi declaration

TXcdCommand = (xecAll, xecFreshen, xecUpdate);

C++Builder declaration

enum TXcdCommand { xecAll, xecFreshen, xecUpdate };

Description

The TXcdCommand type defines possible values for the Cmd parameter of the Add and Extract methods.


Xceed Zip Cmd parameter for Add and Extract (VB and OCX)
Cmd parameter for the Add and Extract methods

VB declaration

Global Const xecAll = 0

Global Const xecFreshen = 1

Global Const xecUpdate = 2

Description

The Add and Extract methods take a single parameter 'Cmd' that may be set to the values xecAll, xecFreshen and xecUpdate.


Xceed Zip TXcdCompressionLevel type
TXcdCompressionLevel Type

Unit

XceedZip

Delphi declaration

TXcdCompressionLevel = 0..9;

C++Builder declaration

typedef Shortint TXcdCompressionLevel;

Description

The TXcdCompressionLevel type defines possible values for the Compression property.


Xceed Zip TXcdReplaceCommand type
TXcdReplaceCommand Type

Unit

XceedZip

Delphi declaration

TXcdReplaceCommand = (xrcSkip, xrcReplace, xrcRename, xrcAlwaysSkip, xrcAlwaysReplace);

C++Builder declaration

enum TXcdReplaceCommand { xrcSkip, xrcReplace, xrcRename, xrcAlwaysSkip, xrcAlwaysReplace };

Description

The TXcdReplaceCommand type defines possible values for the Command field in the TXcdReplaceEvent type.


Xceed Zip Cmd parameter for the Replace event (VB and OCX)
Cmd parameter for the Replace Event

VB declaration

Global Const xrcSkip = 0

Global Const xrcReplace = 1

Global Const xrcRename = 2

Global Const xrcAlwaysSkip = 3

Global Const xrcAlwaysReplace = 4

Description

The Replace event's 'Cmd' parameter may be set to the values xrcSkip, xrcReplace, xrcRename, xrcAlwaysSkip or xrcAlwaysReplace.


Xceed Zip TXcdPwdQueryCommand type
TXcdPwdQueryCommand Type

Unit

XceedZip

Delphi declaration

TXcdPwdQueryCommand = (xpcSkip, xpcAlwaysSkip, xpcNew, xpcAddingNone, xpcAddingNew, xpcAddingNewAlwaysUse);

C++Builder declaration

enum TXcdPwdQueryCommand { xpcSkip, xpcAlwaysSkip, xpcNew, xpcAddingNone, xpcAddingNew, xpcAddingNewAlwaysUse };

Description

The TXcdPwdQueryCommand type defines possible values for the Command field in the TXcdPwdQueryEvent type.


Xceed Zip Cmd parameter for the PwdQuery event (VB and OCX)
Cmd parameter for the PasswordQuery event

VB declaration

Global Const xpcSkip = 0

Global Const xpcAlwaysSkip = 1

Global Const xpcNew = 2

Global Const xpcAddingNone = 3

Global Const xpcAddingNew = 4

Global Const xpcAddingNewAlwaysUse = 5

Description

The PasswordQuery event's 'Cmd' parameter may be set to the values xpcSkip, xpcAlwaysSkip or xpcNew.


Xceed Zip TXcdFileAttr type
TXcdFileAttr Type

Unit

XceedZip

Delphi declaration

TXcdFileAttr = set of (xfaReadOnly, xfaHidden, xfaSystem, xfaVolume, xfaDirectory, xfaArchiveBit);

C++Builder declaration

enum XcdFileAttrEnum { xfaReadOnly, xfaHidden, xfaSystem, xfaVolume, xfaDirectory, xfaArchiveBit };

typedef Set<XcdFileAttrEnum, xfaReadOnly, xfaArchiveBit>  TXcdFileAttr;

Description

The TXcdFileAttr type defines possible file attributes for the Attributes field in the TXcdFileStats type. If Attributes is the empty set, that is, Attributes = [  ], then the file is a normal file. One or more of the following members may be contained in Attributes, and the meaning of each member is:

Member	Meaning

xfaReadOnly	Read-only file.

xfaHidden	Hidden file.

xfaSystem	System file.

xfaVolume	File is a volume label.

xfaDirectory	Directory, not a file.

xfaArchiveBit	Archive bit is set.

For information on testing set membership, consult the Set Operators topic in Delphi help.


Xceed Zip Attr (VBX) and FileAttr parameter (OCX)
Attr (VBX) or FileAttr (OCX) parameter for FileStats Events

Description

The Attr (VBX) or FileAttr (OCX) parameter that is passed to FileStats Events is an integer whose 6 least significant bits may each be on or off. Each bit has a specific meaning as listed below. Bit 0 is the integer's least significant bit. If the Attr parameter = 0 (all bits are off) then the file is a normal file.

Bit	Meaning

0	Read-only file.

1	Hidden file.

2	System file.

3	File is a volume label.

4	Directory, not a file.

5	Archive bit is set.

Xceed has provided you with an easy way to test the Attr/FileAttr parameter for each bit using VB. The constants xfaReadOnly, xfaHidden, xfaSystem, xfaVolume, xfaDirectory and xfaArchiveBit that are defined in XCDTYPES.BAS simplify the process. For example, to test for bit 4, the Directory bit, you may simply use the expression (Attr And xfaDirectory) <> 0. If this expression is True, then the Directory bit is on.


Xceed Zip TXcdFileNameEvent type
TXcdFileNameEvent Type

Delphi declaration

TXcdFileNameEvent = procedure(XceedZip: TXceedZip; const FileName: String) of object;

C++Builder declaration

typedef void __fastcall (__closure *TXcdFileNameEvent)(TXceedZip* XceedZip, const System::AnsiString FileName);

Description

The TXcdFileNameEvent type is the type for the Fixing and Deleting events. These events report that an action is being taken on a file. These events cannot provide more information than the filename, so they are not of type TXcdFileStatsEvent. The FileName parameter contains the filename of the file that will be Fixed or Deleted.


Xceed Zip FileName Events (VB)
FileName Events

Description

FileName events are the type for the Fixing and Deleting events. These events report that an action is being taken on a file. These events cannot provide more information than the filename, so they are not FileStats events. The FileName$ parameter contains the filename of the file that will be Fixed or Deleted.


Xceed Zip TXcdNewdiskEvent type
TXcdNewdiskEvent Type

Delphi declaration

TXcdNewdiskEvent = procedure(XceedZip: TXceedZip; const Disknumber: Integer) of object;

C++Builder declaration

typedef void __fastcall (__closure *TXcdNewdiskEvent)(TXceedZip* XceedZip, const int Disknumber);

Description

The TXcdNewdiskEvent type is the type for the Newdisk event, This event occurs when a new disk must be inserted when handling multiple-disk archives.


Xceed Zip TXcdFileCommentEvent type
TXcdFileCommentEvent Type

Unit

XceedZip

Delphi declaration

TXcdFileCommentEvent = procedure(XceedZip: TXceedZip; var FileComment: TXcdFileComment) of object;

C++Builder declaration

typedef void __fastcall (__closure *TXcdFileCommentEvent)(TXceedZip* XceedZip, TXcdFileComment &FileComment);

Description

The TXcdFileCommentEvent is the type of the FileComment event.


Xceed Zip TXcdFileStatsEvent type
TXcdFileStatsEvent Type

Unit

XceedZip

Delphi declaration

TXcdFileStatsEvent = procedure(XceedZip: TXceedZip; const FileStats: TXcdFileStats) of object;

C++Builder declaration

typedef void __fastcall (__closure *TXcdFileStatsEvent)(TXceedZip* XceedZip, const TXcdFileStats &FileStats);

Description

The TXcdFileStatsEvent type is the type for events that report information on a file about to be processed, or currently being processed. The Adding, Extracting, Listing, Status, Testing, and Updating events are of this type. The FileStats parameter contains the information and statistics for the file being reported on. The fields of the FileStats parameter are:

Field	Description

Attributes	File attributes, in TXcdFileAttr type format.

BytesProcessed*	Number of bytes that have been processed so far.

Comment**	The file's comment, if any.

Completion*	Percentage of the file that has been processed so far.

CRC***	CRC value for the uncompressed file.

Encrypted	True if the file is, or will be, encrypted, False if not.

Name	The filename of the file being reported on.

Method	The compression method used to compress the file. The value is either MethodStore or MethodDeflate.

PackedSize***	File size in bytes, when compressed.

Ratio***	Compression ratio achieved for this file.

Size	File size in bytes, when uncompressed.

Time	Date and time of last modification.

* These fields are meaningless during the Listing event, because the file is not currently being processed, it is only being checked for its file statistics.

** The Comment parameter is only available during the Listing event.

*** The value of these fields is not available during the Adding and Updating events. These fields will only contain valid information on the last Status event occurring for the given file.

Note: For the Extracting and Testing events, for all Status events occurring after an Extracting or Testing event, and for all last Status events for a given file, all fields are available.

For example, suppose a large file called 'picture.bmp' is being added to an archive. First, the Adding event will occur to report that the file 'picture.bmp' is being added. During this event, you can access all the fields of the FileStats parameter, except for CRC, PackedSize and Ratio. Next, the Status event will occur at regular intervals while the file is being compressed. The CRC, PackedSize and Ratio fields are still not available. When the last Status event for 'picture.bmp' occurs, that's when you can use the CRC, PackedSize and Ratio fields.


Xceed Zip TXcdGlobalStatsEvent type
TXcdGlobalStatsEvent Type

Unit

XceedZip

Delphi declaration

TXcdGlobalStatsEvent = procedure(XceedZip: TXceedZip; const GlobalStats: TXcdGlobalStats) of object;

C++Builder declaration

typedef void __fastcall (__closure *TXcdGlobalStatsEvent)(TXceedZip* XceedZip, const TXcdGlobalStats &GlobalStats);

Description

The TXcdGlobalStatsEvent type is the type for the GlobalStatus event that report information on the completion status of the current operation. The GlobalStats parameter contains the information and statistics for the entire add, extract, list or test operation. The fields of the GlobalStats parameter are:

Field	Description

TotalFiles	The total amount of files to zip, unzip, list or test. (LongInt)

ProcessedFiles	The total amount of files processed so far. (LongInt)

CompletionFiles	The percentage of files processed so far. (Byte)

TotalBytes	The total amount of bytes of all the files to zip, unzip, list or test (LongInt)

ProcessedBytes	The total amount of bytes processed so far. (LongInt)

CompletionBytes	The percentage of bytes processed so far. (Byte)


Xceed Zip pararameters for FileStats-type events (VBX)
Parameters for FileStats-type events (VBX)

Description

FileStats events are the type of events that report information on a file about to be processed, or currently being processed. The Adding, Extracting, Listing, Status, Testing, and Updating events are of this type. These events pass along many parameters that contain information and statistics for the file being reported on. The parameters of FileStats events are:

Field	Description + Data Type

FileName$	The filename of the file being reported on. (String)

Size	File size in bytes, when uncompressed. (Long)

PSize***	File size in bytes, when compressed. (Long)

Processed*	Number of bytes that have been processed so far. (Long)

Attr	File attributes, in Attr parameter format. (Integer)

FTime$	Date and time of last modification (String, format: "dd/mm/yy hh:mm"). Year values from 80 to 99 represent 1980 to 1999. Year values from 00 to 79 represent year 2000 to 2079.

CRC***	CRC value for the uncompressed file. (Long)

Ratio***	Compression ratio achieved for this file. (Integer)

Completion*	Percentage of the file that has been processed so far. (Integer)

Method	The compression method used to compress the file. The value is either MethodStore or MethodDeflate. (Integer)

Encrypted	True if the file is, or will be, encrypted, False if not. (Integer)

Comment**	The file's comment, if any.

* These parameters are meaningless during the Listing event, because the file is not currently being processed, it is only being checked for its file statistics.

** The Comment parameter is only available during the Listing event.

*** The value of these parameters is not available during the Adding and Updating events. These parameters will only contain valid information on the last Status event occurring for the given file.

Note: For the Extracting and Testing events, for all Status events occurring after an Extracting or Testing event, and for all last Status events for a given file, all parameters are available.

For example, suppose a large file called 'picture.bmp' is being added to an archive. First, the Adding event will occur to report that the file 'picture.bmp' is being added. During this event, you can access all the parameters, except for CRC, PSize and Ratio. Next, the Status event will occur at regular intervals while the file is being compressed. The CRC, PSize and Ratio parameters are still not available. When the last Status event for 'picture.bmp' occurs, that's when you can use the CRC, PSize and Ratio parameters.


Xceed Zip parameters for FileStats-type events (OCX)
Parameters for FileStats-type events (OCX)

Description

FileStats events are the type of events that report information on a file about to be processed, or currently being processed. The Adding, Extracting, Listing, Status, Testing, and Updating events are of this type. These events pass along many parameters that contain information and statistics for the file being reported on. The parameters of FileStats events are:

Field	Description + Data Type

FileName$	The filename of the file being reported on. (String)

Size	File size in bytes, when uncompressed. (Long)

PSize***	File size in bytes, when compressed. (Long)

Processed*	Number of bytes that have been processed so far. (Long)

FileAttr	File attributes, in FileAttr parameter format. (Integer)

FTime$	Date and time of last modification (String, format: "dd/mm/yy hh:mm"). Year values from 80 to 99 represent 1980 to 1999. Year values from 00 to 79 represent year 2000 to 2079.

CRC***	CRC value for the uncompressed file. (Long)

Ratio***	Compression ratio achieved for this file. (Integer)

Completion*	Percentage of the file that has been processed so far. (Integer)

Method	The compression method used to compress the file. The value is either MethodStore or MethodDeflate. (Integer)

Encrypted	True if the file is, or will be, encrypted, False if not. (Integer)

ComLen**	The length of the file's comment, 0 if no comment for the file.

Comment**	The file's comment, if any.

* These parameters are meaningless during the Listing event, because the file is not currently being processed, it is only being checked for its file statistics.

** The ComLen and Comment parameters are only available during the Listing event.

*** The value of these parameters is not available during the Adding and Updating events. These parameters will only contain valid information on the last Status event occurring for the given file.

Note: For the Extracting and Testing events, for all Status events occurring after an Extracting or Testing event, and for all last Status events for a given file, all parameters are available.

For example, suppose a large file called 'picture.bmp' is being added to an archive. First, the Adding event will occur to report that the file 'picture.bmp' is being added. During this event, you can access all the parameters, except for CRC, PSize and Ratio. Next, the Status event will occur at regular intervals while the file is being compressed. The CRC, PSize and Ratio parameters are still not available. When the last Status event for 'picture.bmp' occurs, that's when you can use the CRC, PSize and Ratio parameters.


Xceed Zip GlobalStatus event parameters (OCX)
Parameters for the GlobalStatus Event (OCX)

Description

The GlobalStatus event provides parameters containing the following information:

Field	Description + Data Type

TotalFiles	The total amount of files to zip, unzip, list or test. (Long)

ProcessedFiles	The total amount of files processed so far. (Long)

CompletionFiles	The percentage of files processed so far. (Short)

TotalBytes	The total amount of bytes of all the files to zip, unzip, list or test (Long)

ProcessedBytes	The total amount of bytes processed so far. (Long)

CompletionBytes	The percentage of bytes processed so far. (Short)


Xceed Zip GlobalStatus event parameters (VBX)
Parameters for the GlobalStatus Event (VBX)

Description

The GlobalStatus event provides parameters containing the following information:

Field	Description + Data Type

TotalFiles	The total amount of files to zip, unzip, list or test. (Long)

ProcessedFiles	The total amount of files processed so far. (Long)

CompletionFiles	The percentage of files processed so far. (Short)

TotalBytes	The total amount of bytes of all the files to zip, unzip, list or test (Long)

ProcessedBytes	The total amount of bytes processed so far. (Long)

CompletionBytes	The percentage of bytes processed so far. (Short)


Xceed Zip TXcdFileComment type
TXcdFileComment Type

Unit

XceedZip

Delphi declaration

TXcdFileComment = record

Name: String;

Comment: String[255];

end;

PXcdFileComment = ^TXcdFileComment;

C++Builder declaration

struct TXcdFileComment

{

  System::AnsiString Name;

  System::SmallString<255>  Comment;

};

Description

The TXcdFileComment type is used by handlers for the TXcdFileCommentEvent event. This event receives a parameter called FileComment which contains the Name and Comment parameters.


Xceed Zip TXcdFileStats type
TXcdFileStats Type

Unit

XceedZip

Delphi declaration

TXcdFileStats = record

Name: String;

Size: LongInt;

PackedSize: LongInt;

BytesProcessed: LongInt;

Attributes: TXcdFileAttr;

Time: TDateTime;

CRC: LongInt;

Ratio: Byte;

Completion: Byte;

Method: Byte;

Encrypted: Boolean;

Comment: String;

end;

PXcdFileStats = ^TXcdFileStats;

C++Builder declaration

struct TXcdFileStats

{

  System::AnsiString Name;

  long Size;

  long PackedSize;

  long BytesProcessed;

  TXcdFileAttr Attributes;

  System::TDateTime Time;

  long CRC;

  Byte Ratio;

  Byte Completion;

  Byte Method;

  bool Encrypted;

  System::SmallString<255> Comment;

};

Description

The TXcdFileStats type is used by handlers for TXcdFileStatsEvent type events. These events receive a parameter called FileStats which is of this type.


Xceed Zip TXcdGlobalStats type
TXcdGlobalStats Type

Unit

XceedZip

Delphi declaration

TXcdGlobalStats = record

  TotalFiles: LongInt;

  ProcessedFiles: LongInt;

  CompletionFiles: Byte;

  TotalBytes: LongInt;

  ProcessedBytes: LongInt;

  CompletionBytes: Byte;

end;

PXcdGlobalStats = ^TXcdGlobalStats;

C++Builder declaration

struct TXcdGlobalStats

{

long TotalFiles;

long ProcessedFiles;

Byte CompletionFiles;

long TotalBytes;

long ProcessedBytes;

Byte CompletionBytes;

} ;

typedef TXcdGlobalStats *PXcdGlobalStats;

Description

The TXcdGlobalStats type is used in the TXcdGlobalStatsEvent event. The events receive a parameter called GlobalStats which is of this type.


Xceed Zip TXcdOverwrite type
TXcdOverwrite Type

Unit

XceedZip

Delphi declaration

TXcdOverwrite = (xowAsk, xowNever, xowAlways);

C++Builder declaration

enum TXcdOverwrite{xowAsk, xowNever, xowAlways};

Description

The TXcdOverwrite type defines possible values for the Overwrite property.


Xceed Zip TXcdSfxButton type
TXcdSfxButton Type

Unit

XceedZip

Delphi declaration

TXcdSfxButton = (xsbOk, xsbCancel, xsbAbort, xsbSkip, xsbAlwaysSkip, xsbYes, xsbNo, xsbOverwriteAll, xsbOverwriteNone, xsbContinue, xsbExit);

C++Builder declaration

enum TXcdSfxButton { xsbOk, xsbCancel, xsbAbort, xsbSkip, xsbAlwaysSkip, xsbYes, xsbNo, xsbOverwriteAll, xsbOverwriteNone, xsbContinue, xsbExit };

Description

The TXcdSfxButton type defines the possible array index values for the SfxButtons property.


Xceed Zip TXcdSfxMessage type
TXcdSfxMessage Type

Unit

XceedZip

Delphi declaration

TXcdSfxMessage = (xsmSuccess, xsmFail, xsmErrorCreatingDir, xsmIntro, xsmLicense);

C++Builder declaration

enum TXcdSfxMessage { xsmSuccess, xsmFail, xsmErrorCreatingDir, xsmIntro, xsmLicense };

Description

The TXcdSfxMessage type defines the possible array index values for the SfxMessages and SfxShowMessages properties.


Xceed Zip TXcdSfxPrompt type
TxcdPrompt Type

Unit

XceedZip

Delphi declaration

TXcdSfxPrompt = (xspDirectory, xspPassword, xspInsertLastDisk, xspInsertDisk, xspAbortExtract, xspCreateDir, xspOverwrite);

C++Builder declaration

enum TXcdSfxPrompt { xspDirectory, xspPassword, xspInsertLastDisk, xspInsertDisk, xspAbortExtract, xspCreateDir, xspOverwrite };

Description

The TXcdSfxPrompt type defines the possible array index values for the SfxPrompts property.


Xceed Zip TXcdSfxString type
TXcdString Type

Unit

XceedZip

Delphi declaration

TXcdSfxString = (xssExtractingFile, xssProgress, xssTitle, xssCurrentExtractDir, xssDriveShare, xssEntireNetwork);

C++Builder declaration

enum TXcdSfxString { xssExtractingFile, xssProgress, xssTitle, xssCurrentExtractDir, xssDriveShare, xssEntireNetwork };

Description

The TXcdSfxString type defines possible values for the SfxString property.


Xceed Zip TXcdPwdQueryEvent type
TXcdPwdQueryEvent Type

Unit

XceedZip

Delphi declaration

TXcdPwdQueryEvent = procedure(XceedZip: TXceedZip; var PwdQuery: TXcdPwdQuery) of object;

C++Builder declaration

typedef void __fastcall (__closure *TXcdPwdQueryEvent)(TXceedZip* XceedZip, TXcdPwdQuery &PwdQuery);

Description

The TXcdPwdQueryEvent type is the type of the PwdQuery event. When this event occurs while extracting or testing files, a decryption password can be supplied for the current file being processed. When this event occurs while adding files, an encryption password can be supplied. The Name field of the PwdQuery parameter contains the name of the file for which a password can be supplied. The Command field of the PwdQuery parameter can be set to one of the following values:

Value	Method	Meaning

xpcSkip	Extract/Test	Do not extract this file.

xpcAlwaysSkip	Extract/Test	Do not extract this file, and no not extract any other

files. If Command is set to this value, the PwdQuery

event will not occur any more for the current extract

or test operation.

xpcNew	Extract/Test	Decrypt the file with a newly supplied

password.

xpcAddingNone	Add	Do not encrypt this file.

xpcAddingNew	Add	Encrypt the file with a newly supplied password.

xpcAddingNewAlwaysUse	Add	Do not encrypt this file, and do not encrypt any more

files either. If Command is set to this value, the

PwdQuery event will not occur any more for the

current add operation.

If Command is set to xpcNew or xpcAddingNew, place the new password to use in the Password field of the PwdQuery parameter. Passwords can have a length of up to 80 characters.

If no handler for the PwdQuery event has been assigned, or the Command parameter is left untouched during an extract or test operation, no encrypted files will be extracted or tested. If the  Command parameter is left untouched during an Add operation, no files will be encrypted.


Xceed Zip PwdQuery event parameters (VBX and OCX)
PwdQuery Event

Description

When the PwdQuery event occurs while extracting or testing files, a decryption password can be supplied for the current file being processed. When the PwdQuery event occurs while adding files, an encryption password can be supplied. The FileName parameter contains the name of the current file for which a password can be supplied. The Cmd  parameter can be set to one of the following values:

Value	Methods	Meaning

xpcSkip	Extract/Test	Do not extract this file.

xpcAlwaysSkip	Extract/Test	Do not extract this file, and no not extract any other

files. If Cmd is set to this value, the PwdQuery

event will not occur any more for the current extract

or test operation.

xpcNew	Extract/Test	Decrypt the file with a newly supplied

password.

xpcAddingNone	Add	Do not encrypt this file.

xpcAddingNew	Add	Encrypt the file with a newly supplied password.

xpcAddingNewAlwaysUse	Add	Do not encrypt this file, and do not encrypt any more

files either. If Cmd is set to this value, the

PwdQuery event will not occur any more for the

current add operation.

If Cmd is set to xpcNew or xpcAddingNew, place the new password to use in the Password field of the PwdQuery parameter. Passwords can have a length of up to 80 characters.

If no handler for the PwdQuery event has been assigned, or the Command parameter is left untouched during an extract or test operation, no encrypted files will be extracted or tested. If the  Command parameter is left untouched during an Add operation, no files will be encrypted.


Xceed Zip TXcdPwdQuery type
TXcdPwdQuery Type

Unit

XceedZip

Delphi declaration

TXcdPwdQuery = record

Name: String;

Password: String[80];

Command: TXcdPwdQueryCommand;

end;

PXcdPwdQuery = ^TXcdPwdQuery;

C++Builder declaration

struct TXcdPwdQuery

{

  System::AnsiString Name;

  System::SmallString<80>  Password;

  TXcdPwdQueryCommand Command;

};

Description

The TXcdPwdQuery type is used by the PwdQuery event, which is of type TXcdPwdQueryEvent, to supply a decryption password for an encrypted file to be extracted or tested.


Xceed Zip TXcdReplaceEvent type
TXcdReplaceEvent Type

Unit

XceedZip

Delphi declaration

TXcdReplaceEvent = procedure(XceedZip: TXceedZip; var Replace: TXcdReplace) of object;

C++Builder declaration

typedef void __fastcall (__closure *TXcdReplaceEvent)(TXceedZip* XceedZip, TXcdReplace &Replace);

Description

The TXcdReplaceEvent type is the type of the Replace event. When this event occurs, a choice can be made to determine if a file being extracted should replace an already existing file with the same filename in the destination directory. The OrigName field of the Replace parameter contains the name of the file that will replace the already existing file. The Command field of the Replace parameter can be set to one of the following values:

Value	Meaning

xrcSkip	Do not extract this file. The existing file will not be replaced.

xrcReplace	Extract this file. The existing file will be replaced.

xrcRename	Rename the file to be extracted.

xrcAlwaysSkip	Do not extract this file, and do not extract all other files that already exist. If Command is set to this value, the Replace event will not occur any more for the current extract operation.

xrcAlwaysReplace	Extract this file, and extract all other files that will replace already existing files. If Command is set to this value, the Replace event will not occur any more for the current extract operation.

If Command is set to xrcRename, place the new filename for the file to be extracted in the NewName field of the Replace parameter.

If no handler for the Replace event has been assigned, or the Replace parameter is left untouched, no existing files will be replaced.


Xceed Zip TXcdRenameEvent type
TXcdRenameEvent Type

Unit

XceedZip

Delphi declaration

TXcdRenameEvent = procedure(XceedZip: TXceedZip; var Rename: TXcdReplace) of object;

C++Builder declaration

typedef void __fastcall (__closure *TXcdRenameEvent)(TXceedZip* XceedZip, TXcdRename &Rename);

Description

The TXcdRenameEvent type is the type of the Rename event. When this event occurs, the path and filename of a file about to be added or extracted can be changed. The OrigName field of the Rename parameter contains the path and filename of a file that will be added to, or extracted from the zip file. Place the new path and filename in the NewName field if you want to alter the path and filename.

If no handler for the Rename event has been assigned, or the NewName parameter is left untouched, no files be renamed.


Xceed Zip Replace event parameters (VBX and OCX)
Replace Event

Description

When the Replace event occurs, a choice can be made to determine if a file being extracted should replace an already existing file with the same filename in the destination directory. The OrigName parameter contains the name of the file that will replace the already existing file. The Cmd parameter can be set to one of the following values:

Value	Meaning

xrcSkip	Do not extract this file. The existing file will not be replaced.

xrcReplace	Extract this file. The existing file will be replaced.

xrcRename	Rename the file to be extracted.

xrcAlwaysSkip	Do not extract this file, and do not extract all other files that already exist. If Cmd is set to this value, the Replace event will not occur any more for the current extract operation.

xrcAlwaysReplace	Extract this file, and extract all other files that will replace already existing files. If Cmd is set to this value, the Replace event will not occur any more for the current extract operation.

If Cmd is set to xrcRename, place the new filename for the file to be extracted in the NewName$ parameter.

If no handler for the Replace has been assigned, or all the parameters are left untouched, no existing files will be replaced.


Xceed Zip Rename event parameters (VBX and OCX)
Rename Event

Description

When the Rename event occurs, the path and filename of a file about to be added or extracted can be changed. The OrigName field of the Rename parameter contains the path and filename of a file that will be added to, or extracted from the zip file. Place the new path and filename in the NewName field if you want to alter the path and filename.

If no handler for the Rename event has been assigned, the path and filename will not be changed and the file will be added or extracted as indicated in the OrigName field.


Xceed Zip TXcdReplace type
TXcdReplace Type

Unit

XceedZip

Delphi declaration

TXcdReplace = record

OrigName: String;

NewName: String;

Command: TXcdReplaceCommand;

end;

PXcdReplace = ^TXcdReplace;

C++Builder declaration

struct TXcdReplace

{

  System::AnsiString OrigName;

  System::AnsiString NewName;

  TXcdReplaceCommand Command;

};

Description

The TXcdReplace type is used by the Replace event, which is of type TXcdReplaceEvent. It allows an action to be taken when an existing file must be replaced by a file about to be extracted.


Xceed Zip TXcdRename type
TXcdRename Type

Unit

XceedZip

Delphi declaration

TXcdRename = record

OrigName: String;

NewName: String;

end;

PXcdRename = ^TXcdRename;

C++Builder declaration

struct TXcdRename

{

  System::AnsiString OrigName;

  System::AnsiString NewName;

};

Description

The TXcdRename type is used by the Rename event, which is of type TXcdRenameEvent. The OrigName field you to see the path and name of the file as it is about to be called in the archive (when adding files) or on disk (when extracting files). The NewName field lets you specify an alternate path and filename.


Xceed Zip TXcdSkippingEvent type
TXcdSkippingEvent Type

Unit

XceedZip

Delphi declaration

TXcdSkippingEvent = procedure(XceedZip: TXceedZip; const Skipping: TXcdSkipping) of object;

C++Builder declaration

typedef void __fastcall (__closure *TXcdSkippingEvent)(TXceedZip* XceedZip, const TXcdSkipping&Skipping);

Description

The TXcdSkippingEvent type is the type of the SkippingFile event. The SkippingFile event reports that a file that is supposed to be processed will be skipped. The Skipping parameter contains the following fields:

Field	Meaning

Name	The filename of the file being skipped.

Reason	The reason the file is being skipped.

The Reason field may have the following values:

Value	Reason the file was skipped

xsrFileNotFound	File was not found. If the file is a wildcard expression, no files were found that match the wildcard expression.

xsrBadVersion	The file was compressed with an unknown or unsupported compression technique, and could not be extracted or tested. This typically happens if the file was Zipped with a version of PKZip before 2.0. Convert the file to the latest Zip format to eliminate skipping files for this reason.

xsrBadCrc	The file is corrupted, it produces the wrong CRC.

xsrUpToDate	A file in the list of files to update or freshen will not be added to an archive because the file already in the archive is identical or newer than the file to be updated.

xsrUnableToOpen	The file was found but could not be opened for reading or writing.

xsrBadPassword	Encrypted file, unknown or invalid password supplied for this file. Could not be extracted or tested.

xsrBadData	The file's compressed data is corrupted. Further processing of this file is impossible. Processing will continue with the next file in the archive.

xsrOverwrite	The Overwrite property setting (or the response given when the OnReplace event occurs) has instructed Xceed Zip to skip this file. This can only occur if the file being added or extracted already exists in the archive or destination directory.


Xceed Zip SkippingFile event parameters (VBX and OCX)
SkippingFile Event

Description

When the SkippingFile event occurs, it reports that a file that is supposed to be processed will be skipped. The parameters supplied by the event are:

Parameter	Meaning + Data Type

FileName	The filename of the file being skipped. (String)

Reason	The reason the file is being skipped. (Integer)

The Reason parameter may have the following values:

Value	Reason the file was skipped

xsrFileNotFound	File was not found. If the file is a wildcard expression, no files were found that match the wildcard expression.

xsrBadVersion	The file was compressed with an unknown or unsupported compression technique, and could not be extracted or tested. This typically happens if the file was Zipped with a version of PKZip before 2.0. Convert the file to the latest Zip format to eliminate skipping files for this reason.

xsrBadCrc	The file is corrupted, it produces the wrong CRC.

xsrUpToDate	A file in the list of files to update or freshen will not be added to an archive because the file already in the archive is identical or newer than the file to be updated.

xsrUnableToOpen	The file was found but could not be opened for reading or writing.

xsrBadPassword	Encrypted file, unknown or invalid password supplied for this file. Could not be extracted or tested.

xsrBadData	The file's compressed data is corrupted. Further processing of this file is impossible. Processing will continue with the next file in the archive.

xsrOverwrite	The Overwrite property setting (or the response given when the OnReplace event occurs) has instructed Xceed Zip to skip this file. This can only occur if the file being added or extracted already exists in the archive or destination directory.


Xceed Zip TXcdSkipping type
TXcdSkipping Type

Unit

XceedZip

Delphi declaration

TXcdSkipping = record

Name: String;

Reason: TXcdSkippingReason;

end;

C++Builder declaration

struct TXcdSkipping

{

  System::AnsiString Name;

  TXcdSkippingReason Reason;

};

Description

The TXcdSkipping type contains the name and reason of a file being skipped. It is the type for the Skipping parameter provided to handlers of TXcdSkippingEvent type events.


Xceed Zip TXcdSkippingReason type
TXcdSkippingReason

Unit

XceedZip

Delphi Declaration

TXcdSkippingReason = (xsrFileNotFound, xsrBadVersion, xsrBadCrc, xsrUpToDate, xsrUnableToOpen, xsrBadPassword, xsrBadData, xsrOverwrite);

C++Builder Declaration

enum TXcdSkippingReason { xsrFileNotFound, xsrBadVersion, xsrBadCrc, xsrUpToDate, xsrUnableToOpen, xsrBadPassword,xsrBadData, xsrOverwrite };

Description

The TXcdSkippingReason type is a value containing a reason for skipping a file. It is used in the TXcdSkipping type.


Xceed Zip Reason parameter for the SkippingFile event (VB and OCX)
Reason parameter for the OnSkippingFile Event

VB declaration

Global Const xsrFileNotFound = 0

Global Const xsrBadVersion = 1

Global Const xsrBadCRC = 2

Global Const xsrUpToDate = 3

Global Const xsrUnableToOpen = 4

Global Const xsrBadPassword = 5

Global Const xsrBadData = 6

Global Const xsrOverwrite = 7

Description

The SkippingFile event's 'Reason' parameter may be one of these values: xsrFileNotFound, xsrBadVersion, xsrBadCRC, xsrUpToDate, xsrUnableToOpen, xsrBadPassword, xsrBadData or xsrOverwrite.


Xceed Zip Constants

The following constants are used by the Xceed Zip components, in addition to the constants related to error codes:

•	MethodStore

•	MethodDeflate

•	XcdFirstError

•	Lastdisk

The declarations for these constants for Visual Basic can be found in the XCDTYPES.BAS file included with Xceed Zip in the DEMOS\VB16 or DEMOS\VB32 directories. The Delphi VCL has these declarations build in, and the Borland C++Builder 1.0 and 3.0 components have these declarations included in the XCDZIPC1.HPP and XCDZIPC3.HPP files.


Xceed Zip Errors
Xceed Zip Error codes

The following constants define the possible return values of all the Xceed Zip methods except for the memory and string compression methods. There are three categories of return values: XcdSuccess, warnings and errors. A return value in the warnings category indicates that the operation can be considered generally successful, although something occurred that may deserve attention. A return value in the errors category indicates that a problem occurred and the operation was forced to stop. See the error code value chart for a printable listing of errors and their corresponding values.

The declarations for these error codes for Visual Basic 3, 4 and 5 can be found in the XCDTYPES.BAS file included with the Xceed Zip VBX and OCX. The Delphi .DCU unit files have these declarations built-in, and the Borland C++Builder 1.0 and 3.0 components include the declarations in the XCDZIPC1.HPP and XCDZIPC3.HPP files.

The sample applications for VB, Delphi and C++Builder include a function which takes an error code as a parameter and displays a message box with a description of the error. You can copy this function from the sample application directly into your own application if desired. It is useful for debugging purposes, or if you want your application to display messages if there an error occurs.

Warnings

• XcdWarningGeneral (10) • XcdWarningNoZipFile (30)	• XcdWarningFilesSkipped (40) • XcdWarningEmptyZipFile (50)
Errors

• XcdErrorNoZipFile (100) • XcdErrorZipStruct (110) • XcdErrorMemory (120) • XcdErrorBadCall (130) • XcdErrorNothingToDo (140) • XcdErrorDiskFull (150) • XcdErrorEOF (160) • XcdErrorLibInUse (180) • XcdErrorUserAbort (190) • XcdErrorTestFailed (200) • XcdErrorZeroTested (210) • XcdErrorDLLNotFound (240) • XcdErrorInternalLogic (250) • XcdErrorTempFile (280) • XcdErrorRead (290) • XcdErrorWrite (300)	• XcdErrorCantCreateFile (310) • XcdErrorParentDir (350) • XcdErrorNameRepeat (370) • XcdErrorLatest (380) • XcdErrorDOSError (400) • XcdErrorMultidisk (410) • XcdErrorWrongDisk (420) • XcdErrorMultidiskBadCall (430) • XcdErrorCantOpenBinary (440) • XcdErrorCantOpenSfxConfig (450) • XcdErrorInvalidEventParam (460) • XcdErrorCantWriteSfx (470) • XcdErrorBinaryVersion (490) • XcdErrorNotLicensed (500) • XcdErrorCantCreateDir (510)


Xceed Zip Errors
Xceed Zip Error codes

The following constants define the possible return values of all the Xceed Zip methods except for the memory and string compression methods. There are three categories of return values: XcdSuccess, warnings and errors. A return value in the warnings category indicates that the operation can be considered generally successful, although something occurred that may deserve attention. A return value in the errors category indicates that a problem occurred and the operation was forced to stop. See the error code value chart for a printable listing of errors and their corresponding values.

The declarations for these error codes for Visual Basic 3, 4 and 5 can be found in the XCDTYPES.BAS file included with the Xceed Zip VBX and OCX. The Delphi .DCU unit files have these declarations built-in, and the Borland C++Builder 1.0 and 3.0 components include the declarations in the XCDZIPC1.HPP and XCDZIPC3.HPP files.

The sample applications for VB, Delphi and C++Builder include a function which takes an error code as a parameter and displays a message box with a description of the error. You can copy this function from the sample application directly into your own application if desired. It is useful for debugging purposes, or if you want your application to display messages if there an error occurs.

Warnings

• XcdWarningGeneral (10) • XcdWarningNoZipFile (30)	• XcdWarningFilesSkipped (40) • XcdWarningEmptyZipFile (50)
Errors

• XcdErrorNoZipFile (100) • XcdErrorZipStruct (110) • XcdErrorMemory (120) • XcdErrorBadCall (130) • XcdErrorNothingToDo (140) • XcdErrorDiskFull (150) • XcdErrorEOF (160) • XcdErrorLibInUse (180) • XcdErrorUserAbort (190) • XcdErrorTestFailed (200) • XcdErrorZeroTested (210) • XcdErrorDLLNotFound (240) • XcdErrorInternalLogic (250) • XcdErrorTempFile (280) • XcdErrorRead (290) • XcdErrorWrite (300)	• XcdErrorCantCreateDir (310) • XcdErrorParentDir (350) • XcdErrorNameRepeat (370) • XcdErrorLatest (380) • XcdErrorDOSError (400) • XcdErrorMultidisk (410) • XcdErrorWrongDisk (420) • XcdErrorMultidiskBadCall (430) • XcdErrorCantOpenBinary (440) • XcdErrorCantOpenSfxConfig (450) • XcdErrorInvalidEventParam (460) • XcdErrorCantWriteSfx (470) • XcdErrorBinaryVersion (490) • XcdErrorNotLicensed (500) • XcdErrorCantCreateDir (510)


Xceed Zip Error Chart
Error code value chart

Value	Error code

0	XcdSuccess

10	XcdWarningGeneral

30	XcdWarningNoZipFile

40	XcdWarningFilesSkipped

50	XcdWarningEmptyZipFile

100	XcdErrorNoZipFile

110	XcdErrorZipStruct

120	XcdErrorMemory

130	XcdErrorBadCall

140	XcdErrorNothingToDo

150	XcdErrorDiskFull

160	XcdErrorEOF

180	XcdErrorLibInUse

190	XcdErrorUserAbort

200	XcdErrorTestFailed

210	XcdErrorZeroTested

240	XcdErrorDLLNotFound

250	XcdErrorInternalLogic

280	XcdErrorTempFile

290	XcdErrorRead

300	XcdErrorWrite

310	XcdErrorCantCreateFile

350	XcdErrorParentDir

370	XcdErrorNameRepeat

380	XcdErrorLatest

400	XcdErrorDOSError

410	XcdErrorMultidisk

420	XcdErrorWrongDisk

430	XcdErrorMultidiskBadCall

440	XcdErrorCantOpenBinary

450	XcdErrorCantOpenSfxConfig

460	XcdErrorInvalidEventParam

470	XcdErrorCantWriteSfx

490	XcdErrorBinaryVersion

500	XcdErrorNotLicensed

510	XcdErrorCantCreateDir


Xceed Zip MethodStore Constant
MethodStore

Applies to

Method parameter of the following events: Adding, Extracting, Listing, Testing and Updating.

Delphi declaration

MethodStore = 0;

VB declaration

Global Const MethodStore = 0

Description

The MethodStore constant is the value indicating a file is stored in the archive without compression. To store files in an archive without compression, you can set the Compression property to 0, or use the StoredExtensions property.


Xceed Zip MethodDeflate Constant
MethodDeflate

Applies to

Method parameter of the following events: Adding, Extracting, Listing, Testing and Updating.

Delphi declaration

MethodDeflate = 8;

VB declaration

Global Const MethodDeflate = 8

Description

The MethodDeflate constant is the value indicating a file is compressed using the Deflate method. It is the compression method used by PKZip 2.04g, PKZip 2.x for Windows, WinZip and the Xceed Zip Compression Library.


Xceed Zip Lastdisk Constant
Lastdisk

Applies to

DiskNumber parameter of the Newdisk event.

Delphi declaration

Lastdisk = 0;

VB declaration

Global Const Lastdisk = 0

Description

The Lastdisk constant is the value indicating that the last disk of an archive set must be inserted.


Xceed Zip XcdSuccess Error
XcdSuccess

Delphi declaration

XcdSuccess = 0;

VB declaration

Global Const XcdSuccess = 0

Description

The XcdSuccess constant is a value indicating that the operation was completed successfully, without warnings or errors.


Xceed Zip XcdWarningGeneral Warning
XcdWarningGeneral

Delphi declaration

XcdWarningGeneral = 10;

VB declaration

Global Const XcdWarningGeneral = 10

Description

The XcdWarningGeneral constant is a value indicating that some minor structural inconsistencies were detected in the archive file. If this warning occurs, files in the archive file are probably extractable, but applying the Fix method on the archive file is recommended. Among the possible problems that can trigger this return value are: Garbage or extra data at the end of the archive file, unsupported extra fields within the local file headers, different actual and expected filesizes, an extra field containing a second CRC code or unrecognized data in the header fields of the archive file.


Xceed Zip XcdWarningNoZipFile Warning
XcdWarningNoZipFile

Delphi declaration

XcdWarningNoZipFile = 30;

VB declaration

Global Const XcdWarningNoZipFile = 30

Description

The XcdWarningNoZipFile constant is a value indicating that the archive file was not found, and a new one was created. This warning can occur only during the execution of the Add method when updating, because the archive file is expected to be found, but not necessarily needed, since a new one can be created to update files to. If the nature of the operation cannot allow a new archive file to be created in order to proceed, the XcdErrorNoZipFile error will occur instead of this warning.


Xceed Zip WarningFilesSkipped Warning
XcdWarningFilesSkipped

Delphi declaration

XcdWarningFilesSkipped = 40;

VB declaration

Global Const XcdWarningFilesSkipped = 40

Description

The XcdWarningFilesSkipped constant is a value indicating that some of the files to be processed were skipped. The particular files that were skipped, and the reasons for skipping them, are reported by the SkippingFile event.


Xceed Zip WarningEmptyZipFile Warning
XcdWarningEmptyZipFile

Delphi declaration

XcdWarningEmptyZipFile = 50;

VB declaration

Global Const XcdWarningEmptyZipFile = 50

Description

The XcdWarningEmptyZipFile constant is a value indicating that the Zip file contains no files. This happens when you try to Extract, List or Test an empty Zip file. You can create an empty Zip file by deleting all the files in a Zip file with the Delete method.


Xceed Zip XcdFirstError Constant
XcdFirstError

Delphi declaration

XcdFirstError = 100;

VB declaration

Global Const XcdFirstError = 100

Description

The XcdFirstError constant is a value that defines the frontier between warning and error codes. If the value of a return code of any Xceed Zip method is greater than or equal to the value of XcdFirstError, then an error has occurred and has caused the method to stop. If the value of a return code is smaller than the value of the XcdFirstError constant, the operation can be considered successful, since only XcdSuccess and warnings will have values that fall into this category.


Xceed Zip XcdErrorNoZipFile Error
XcdErrorNoZipFile

Delphi declaration

XcdErrorNoZipFile = 100;

VB declaration

Global Const XcdErrorNoZipFile = 100

Description

The XcdErrorNoZipFile constant is a value indicating that the archive file specified in the ZipFileName property was not found. This error occurs when the archive file must be found in order to proceed. If the nature of the current operation allows a new archive file to be created, the XcdWarningNoZipFile warning would occur instead of this error. For example, during the execution of the Extract, Fix or UpdateZipDate methods, an archive file must be found in order to proceed.

Tips

If you are specifying a ZipFileName using relative paths (a path relative to the current directory), be sure the current directory is what you expect it to be.


Xceed Zip XcdZipStruct Error
XcdErrorZipStruct

Delphi declaration

XcdErrorZipStruct = 110;

VB declaration

Global Const XcdErrorZipStruct = 110

Description

The XcdErrorZipStruct constant is a value indicating that the contents of the archive file are corrupted, and cannot be accessed. It is sometimes possible to use the Fix method to repair an archive that causes this error.

Archive files that have been transferred by modem in ASCII mode instead of binary mode will always cause this error to occur, and cannot be fixed with the Fix method.

This error also occurs if an attempt is made to open a Zip file that does not contain any files.


Xceed Zip XcdErrorMemory Error
XcdErrorMemory

Delphi declaration

XcdErrorMemory = 120;

VB declaration

Global Const XcdErrorMemory = 120

Description

The XcdErrorMemory constant is a value indicating that there is not enough memory available to successfully complete the current operation.


Xceed Zip XcdErrorBadCall Error
XcdErrorBadCall

Delphi declaration

XcdErrorBadCall = 130;

VB declaration

Global Const XcdErrorBadCall = 130

Description

The XcdErrorBadCall constant is a value indicating that unacceptable property settings have been entered. This error typically occurs when wildcards are not used properly.

This error may also occur if a method is executed with an unacceptable parameter. For example, calling the Add with a parameter of -1.


Xceed Zip XcdErrorNothingToDo Error
XcdErrorNothingToDo

Delphi declaration

XcdErrorNothingToDo = 140;

VB declaration

Global Const XcdErrorNothingToDo = 140

Description

The XcdErrorNothingToDo constant is a value indicating that no files were matched, or no files could be processed among the files to process specified.

Tips

This error occurs because all the files specified using the FilesToProcess property or AddItem method were skipped. If this error occurs, you will be able to determine why no files are being processed by using the SkippingFile event to find out why files are being skipped.

You can avoid writing code for the SkippingFile event by copying the handler for the SkippingFile event from the sample applications included with the Xceed Zip Compression Library. The handler from the sample applications displays a message box whenever a file is being skipped.


Xceed Zip XcdErrorDiskFull Error
XcdErrorDiskFull

Delphi declaration

XcdErrorDiskFull = 150;

VB declaration

Global Const XcdErrorDiskFull = 150

Description

The XcdErrorDiskFull constant is a value indicating that there was not enough space on the storage device to complete the current operation. For some types of devices and in some situations, the XcdErrorWrite error may occur instead of the XcdErrorDiskFull error.

Tips

If you are zipping to removeable media such as a floppy disk, you can instruct Xceed Zip to create multidisk Zip files. For more info, see the MultidiskMode.


Xceed Zip XcdErrorEOF Error
XcdErrorEOF

Delphi declaration

XcdErrorEOF = 160;

VB declaration

Global Const XcdErrorEOF = 160

Description

The XcdErrorEOF constant is a value indicating that an unexpected end-of-file occurred while reading the archive file. This error can occur when the archive file is truncated, is missing information, or is corrupted.


Xceed Zip XcdErrorLibInUse Error
XcdErrorLibInUse

Delphi declaration

XcdErrorLibInUse = 180;

VB declaration

Global Const XcdErrorLibInUse = 180

Description

The XcdErrorLibInUse constant is a value indicating that the DLL required to run the current method (XCDZIP.DLL or XCDUNZIP.DLL when using the 16-bit VBX or VCL, XCDZIP32.DLL or XCDUNZ32.DLL when using the 32-bit Delphi/C++Builder VCLs) is currently being used on the system. This may happen if another program is using these DLLs, or if another instance of the Xceed Zip control is currently executing one of its methods.

This error also applies to the 32-bit OCX when tasks from the same process try to zip or unzip at the same time, but does not apply to tasks from different applications.

Note: If a program using the Xceed Zip VBX or VCL controls crashes during the execution of a handler for one of the Xceed Zip control's methods, this error may occur the next time an Xceed Zip method is executed. This can happen because Xceed Zip is still waiting for the handler of the event to terminate and to return control to Xceed Zip. You must restart your operating system if you had a crash during an Xceed Zip event and are getting this error.

Tips

If you get this error when executing an Xceed Zip method, you can retry executing the method until this error no longer occurs, because once the other application or task has finished executing its current method, your method will get its turn to execute.


Xceed Zip XcdErrorUserAbort Error
XcdErrorUserAbort

Delphi declaration

XcdErrorUserAbort = 190;

VB declaration

Global Const XcdErrorUserAbort = 190

Description

The XcdErrorUserAbort constant is a value indicating that the current operation was aborted because the Abort property was set to True.


Xceed Zip XcdErrorTestFailed Error
XcdErrorTestFailed

Delphi declaration

XcdErrorTestFailed = 200;

VB declaration

Global Const XcdErrorTestFailed = 200

Description

The XcdErrorTestFailed constant is a value indicating that the Test method has tested the archive and that one or more files in the archive have a bad CRC or have corrupted header fields.


Xceed Zip XcdErrorZeroTested Error
XcdErrorZeroTested

Delphi declaration

XcdErrorZeroTested = 210;

VB declaration

Global Const XcdErrorZeroTested = 210

Description

The XcdErrorZeroTested constant is a value indicating that the Test method has not ended up testing any files in the archive to be tested.

Tips

When this error occurs, you should check the SkippingFile  event to see if any files are being skipped and why.


Xceed Zip XcdErrorDLLNotFound Error
XcdErrorDLLNotFound

Delphi declaration

XcdErrorDLLNotFound = 240;

VB declaration

Global Const XcdErrorDLLNotFound = 240

Description

The XcdErrorDLLNotFound constant is a value indicating that the DLL required to run the current method (XCDZIP.DLL or XCDUNZIP.DLL when using the 16-bit VBX or VCL, XCDZIP32.DLL or XCDUNZ32.DLL when using the 32-bit VCL) could not be found on the system. See the About the DLLs topic to find out where the system searches for these DLLs.

This error does not apply to the 32-bit OCX, which does not require the Xceed Zip DLLs.


Xceed Zip XcdErrorInternalLogic Error
XcdErrorInternalLogic

Delphi declaration

XcdErrorInternalLogic = 250;

VB declaration

Global Const XcdErrorInternalLogic = 250

Description

The XcdErrorInternalLogic constant is a value indicating that a logic error has occurred in Xceed Zip. This error will happen if an unexplained error occurs while executing the current method. In rare cases, a file error or unacceptable property settings may cause this error to occur instead of another more appropriate error. If this error occurs, verify that the values of all the properties are allowed and compatible with each other, and that the archive file and the files to process are accessible. If you still get this error, contact Xceed Software technical support.


Xceed Zip XcdErrorTempFile Error
XcdErrorTempFile

Delphi declaration

XcdErrorTempFile = 280;

VB declaration

Global Const XcdErrorTempFile = 280

Description

The XcdErrorTempFile constant is a value indicating that the temporary archive file could not be properly created. This may occur when an incorrect path is specified in the TempPath property, or it can occur if, during the current operation, the temporary file could not be accessed.

Tips

Also check to make sure you have specified a valid value for the ZipFileName property.


Xceed Zip XcdErrorRead Error
XcdErrorRead

Delphi declaration

XcdErrorRead = 290;

VB declaration

Global Const XcdErrorRead = 290

Description

The XcdErrorRead constant is a value indicating that a File Read error has occurred on a file being used by Xceed Zip. This error will occur when zipping files and there is a problem reading the zip file, the temporary zip file or one of the files to zip.

Tips

Check the status of the device where your zip file and temporary file are located to make sure it is online and accessible. Also make sure the files you are zipping are accessible and arent open by other applications. If you are zipping database files, make sure your tables or database is closed.

When running 16-bit applications that use Xceed Zip on a Windows 3.x machine, the SHARE.EXE application must be running. This program normally executed from the AUTOEXEC.BAT file. If you encounter Read or Write errors with Xceed Zip, it may be because this application was not loaded.


Xceed Zip XcdErrorWrite Error
XcdErrorWrite

Delphi declaration

XcdErrorWrite = 300;

VB declaration

Global Const XcdErrorWrite = 300

Description

The XcdErrorWrite constant is a value indicating that an File Write error has occurred on the archive file or one of the files being processed. This error can occur if the device where files are being written to becomes full, cannot be accessed or is having physical write errors.

Tips

Make sure there is enough disk space available on the device for the current operation, and make sure it is online and accessible.

When running 16-bit applications that use Xceed Zip on a Windows 3.x machine, the SHARE.EXE application must be running. This program normally executed from the AUTOEXEC.BAT file. If you encounter Read or Write errors with Xceed Zip, it may be because this application was not loaded.


Xceed Zip XcdErrorCantCreateFile Error
XcdErrorCantCreateFile

Delphi declaration

XcdErrorCantCreateFile = 310;

VB declaration

Global Const XcdErrorCantCreateFile = 310

Description

The XcdErrorCantCreateFile constant is a value indicating that an unrecoverable error occurred while trying to create one of the files being unzipped, the Zip file itself, or the temporary Zip file.

Tips

Make sure the devices being zipped to, or unzipped to, are online and accessible. Also make sure that file creation permissions are granted to your application for the destination directory where the Zip file or the files being extracted are being created.


Xceed Zip XcdErrorParentDir Error
XcdErrorParentDir

Delphi declaration

XcdErrorParentDir = 350;

VB declaration

Global Const XcdErrorParentDir = 350

Description

The XcdErrorParentDir constant is a value indicating that a command that would end up removing the parent directory was detected and canceled by the component. This error will only occur during the execution of the Add method, and only when the Recurse and MoveFiles properties are set to True. For example, setting the Recurse and MoveFiles properties to True and adding '..' to the list of files to process will always cause this error.


Xceed Zip XcdErrorNameRepeat Error
XcdErrorNameRepeat

Delphi declaration

XcdErrorNameRepeat = 370;

VB declaration

Global Const XcdErrorNameRepeat = 370

Description

The XcdErrorNameRepeat constant is a value indicating that two or more files with the same filename were about to be added to the archive. This can only happen when executing the Add method with the Recurse property set to True and the UsePaths property set to False. For detailed information about how and why this error may occur, see the UsePaths property.


Xceed Zip XcdErrorLatest Error
XcdErrorLatest

Delphi declaration

XcdErrorLatest = 380;

VB declaration

Global Const XcdErrorLatest = 380

Description

The XcdErrorLatest constant is a value indicating that the UpdateZipDate method could not update the date of the archive. This error occurs when the specified archive file is empty or contains only directories.


Xceed Zip XcdErrorDosError Error
XcdErrorDOSError

Delphi declaration

XcdErrorDOSError = 400;

VB declaration

Global Const XcdErrorDOSError = 400

Description

The XcdErrorDOSError constant is a value indicating that a File I/O error has occurred on the archive file or one of the files being processed. A File I/O error can occur if the component cannot read, write, open or create a file. It may also occur if, for any reason, a file being read from or written to can no longer be accessed.

Tips

If you are zipping or unzipping database files, make sure your tables or database is closed. Users typically get this error when their database tables havent really been closed, because Xceed Zip cannot properly open the files for reading or writing.

When running 16-bit applications that use Xceed Zip on a Windows 3.x machine, the SHARE.EXE application must be running. This program normally executed from the AUTOEXEC.BAT file. If you encounter Read or Write errors with Xceed Zip, it may be because this application was not loaded.


Xceed Zip XcdErrorMultidisk Error
XcdErrorMultidisk

Delphi declaration

XcdErrorMultidisk = 410;

VB declaration

Global Const XcdErrorMultidisk = 410

Description

The XcdErrorMultidisk constant is a value indicating that an attempt was made to work with an archive that spans multiple disks, but the component was not in Multidisk mode. Set the MultidiskMode property to True if you want to be able to process archives that span multiple disks.


Xceed Zip XcdErrorWrongDisk Error
XcdErrorWrongDisk

Delphi declaration

XcdErrorWrongDisk = 420;

VB declaration

Global Const XcdErrorWrongDisk = 420

Description

The XcdErrorWrongDisk constant is a value indicating that the wrong disk was repeatedly inserted after a request for a specific disk by the Newdisk event. Three (3) attempts at inserting the correct disk are allowed by Xceed Zip when unzipping. Note that this error will always occur if you have forgotten to write an event handler for the Newdisk event and the current destination media gets full.


Xceed Zip XcdErrorMultidiskBadCall Error
XcdErrorMultidiskBadCall

Delphi declaration

XcdErrorMultidiskBadCall = 430;

VB declaration

Global Const XcdErrorMultidiskBadCall = 430

Description

The XcdErrorMultidiskBadCall constant is a value indicating that an attempt was made to execute an operation that is illegal when MultidiskMode is set to True. This error will occur when you try to Add files to an already existing multidisk Zip file, when you try to Delete or Fix a multidisk Zip file, or when you use the UpdateZipDate method on a multidisk Zip file.


Xceed Zip XcdErrorCantOpenBinary Error
XcdErrorCantOpenBinary

Delphi declaration

XcdErrorCantOpenBinary = 440;

VB declaration

Global Const XcdErrorCantOpenBinary = 440

Description

The XcdErrorCantOpenBinary constant is a value indicating that the self-extractor binary specified in the SfxBinary property could not be found or opened.


Xceed Zip XcdErrorCantOpenSfxConfig Error
XcdErrorCantOpenSfxConfig

Delphi declaration

XcdErrorCantOpenSfxConfig = 450;

VB declaration

Global Const XcdErrorCantOpenSfxConfig = 450

Description

The XcdErrorCantOpenSfxConfig constant is a value indicating that the self-extractor configuration file specified in the SfxConfigFile property could not be found or opened.


Xceed Zip XcdErrorInvalidEventParam Error
XcdErrorInvalidEventParam

Delphi declaration

XcdErrorInvalidEventParam = 460;

VB declaration

Global Const XcdErrorInvalidEventParam = 460

Description

The XcdErrorInvalidEventParam constant is a value indicating that an invalid value was specified for a command in an Xceed Zip event. This error will occur, for example, if an invalid value is supplied to the command parameter for the PwdQuery event.


Xceed Zip XcdErrorCantWriteSfx Error
XcdErrorCantWriteSfx

Delphi declaration

XcdErrorCantWriteSfx = 470;

VB declaration

Global Const XcdErrorCantWriteSfx = 470

Description

The XcdErrorCantWriteSfx constant is a value indicating that the self-extractor binary could not be written while creating a self-extracting Zip file. This error will usually be caused due to a lack of enough disk space. If this error occurs only the MultidiskMode property is set to true, then there was not enough space on the first disk to write the entire self-extractor binary. A self-extractor binary cannot itself be split onto multiple disks  only the zip file data that is appended to the binary can be split.


Xceed Zip XcdErrorBinaryVersion Error
XcdErrorBinaryVersion

Delphi declaration

XcdErrorBinaryVersion = 490;

VB declaration

Global Const XcdErrorBinaryVersion = 490

Description

The XcdErrorBinaryVersion constant is a value indicating that the self-extractor binary specified in the SfxBinary property is either an older binary that is no longer compatible with the version of the Xceed Zip control you are currently using, or is a newer binary that is no longer backwards compatible with the your Xceed Zip control. Please make sure you are using the binaries from the same product release as the current Xceed Zip control you are using.


Xceed Zip XcdErrorNotLicensed Error
XcdErrorNotLicensed

Delphi declaration

XcdErrorNotLicensed = 500;

VB declaration

Global Const XcdErrorNotLicensed = 500

Description

The XcdErrorNotLicensed constant is a value indicating that the Xceed Zip OCX currently in use in your application is not licensed to run in applications that are being distributed. If you have a the free trial version of the OCX, you can only use it in your development environment. If you have a registered version, you have incorrectly installed your OCX license file, or have not recompiled all your code after you correctly installed your OCX license file. Please see the installation instructions for your language to make sure the license file is correctly installed, then recompile your application.


Xceed Zip XcdErrorCantCreateDir Error
XcdErrorCantCreateDir

Delphi declaration

XcdErrorCantCreateDir = 510;

VB declaration

Global Const XcdErrorCantCreateDir = 510

Description

The XcdErrorCantCreateDir constant is a value indicating that a directory could not be created. This error typically occurs when the directory specified in the ExtractDirectory property cannot be created, or when the complete path for a file to be extracted cannot be created.

Tips

Make sure your application has the appropriate file permissions to write on the destination storage device. Also, only one directory specified in the ExtractDirectory property will be in order to attempt to extract files into the destination directory. (See the ExtractDirectory property topic for more info)


Xceed Zip Functions
TXceedZip Functions

One of the more tedious, but often necessary, aspects of managing Zip archive files is to manipulate path and filenames. Delphi already provides a wealth of file-management routines, such as the ExpandFilename, ExtractFileExt, ExtractFileName and ExtractFilePath functions. The XceedZip unit provides two more functions to complement the ones provided by Delphi.

•	RemoveBackSlash

•	ExtractRelativePath


Xceed Zip RemoveBackSlash function
RemoveBackSlash Function

Example

Unit

XceedZip

Declaration

function RemoveBackSlash(const Dir: String): String;

Description

The RemoveBackSlash function removes the trailing backslash from a pathname. If a three character drive pathname such as 'a:\' or 'c:\' is supplied, the final backslash is not removed.

The Dir parameter receives the pathname, and the return value of the RemoveBackSlash function is the pathname without a trailing backslash. If there was no backslash to remove, the return value is the same string as was passed in the Dir parameter, unmodified.

This function is particularly useful to insure that acceptable pathnames are provided to commands such as Delphi's ExpandFileName function, or to a property such as TempPath, that does not accept a trailing backslash.


TrailingBackSlash function example
Example

This example opens a dialog box prompting the user for a directory name. The trailing backslash, if any, is removed and the TempPath property is then set to the selected directory. To use this code, add 'FileCtrl' to the Uses clause at the top of the unit.

var

  TempDir: String;

begin

  GetDir(0, TempDir);

  if SelectDirectory(TempDir, [sdAllowCreate, sdPerformCreate,

    sdPrompt], 0) then

      XceedZip1.TempPath := RemoveBackSlash(TempDir)

    else

      XceedZip1.TempPath := '';

end;


Xceed Zip ExtractRelativePath function
ExtractRelativePath Function

Example

Unit

XceedZip

Declaration

function ExtractRelativePath(const FileName, BaseDir: String): String;

Description

The ExtractRelativePath function removes a relative path from a fully qualified pathname. The FileName parameter specifies the pathname to remove a relative path from. The BaseDir parameter contains the relative path to remove. Before the relative path is removed, both FileName and BaseDir are automatically converted to fully qualified pathnames by Delphi's ExpandFileName function.

The return value will be a new pathname, relative to BaseDir, without a leading backslash. If the relative path to remove is not found in the FileName parameter, a fully qualified copy of the FileName parameter is returned.

Like Delphi's ExtractFilePath and ExtractFileName functions, the ExtractRelativePath function will remove an unwanted section from a pathname.


ExtractRelativePath function example
Example

The following code takes the pathname 'c:\users\tom\about.txt' and extracts the relative path 'c:\users'. The result, 'tom\about.txt', is placed in the 'RelPath' string variable.

var

  RelPath: String;

begin

  RelPath := ExtractRelativePath('c:\users\tom\about.txt','c:\users');

  {RelPath now contains a path to 'about.txt' relative to 'c:\users'}

end;


Overwrite and SfxOverwrite Values
Overwrite and SfxOverwrite property values

The Overwrite and the SfxOverwrite properties may be set to one of the following values:

Value	Meaning

xowNever	Existing files will never be replaced by those extracted from the archive. With this setting, the Replace event will not be generated.

xowAlways	Files will always be replaced by those extracted from the archive. With this setting, the Replace event will never be generated.

xowAsk	Generate an Replace event whenever a file is to be overwritten by a file being extracted. In this case a handler should be written for the Replace event to decide on a file-by-file basis, which files to replace.

The default value is xowAsk.


Macros
Macros for properties used by the Self-Extractor Module

Some properties that used by the Self-Extractor Module allow macros to be used when specifying paths and filenames. The macros available are listed in each propertys description.

A macro is a substring of two characters that has the format %x. The x is a letter representing one of the available macros (see below). The two characters representing the macro are replaced by a path only when the actual self-extracting Zip file is executed. Thus, the value of a macro usually depends on the particular settings of the Windows operating system the self-extracting Zip file is being run on.

All macros except for the %r macro include the drive as part of the path. The %v macro only contains the drive letter followed by the colon (:) character. None of the macros contains a trailing backslash.

Macros used by the SfxPrompts and SfxStrings properties are special macros that apply only to those properties. Only the macros common to multiple properties are listed below.

Here is a list of the common macros:

Macro	Description

%w	The location of the Windows Directory.

%s	The location of the Windows System directory.

%t	The systems temporary directory.

%r	Random folder name that doesnt already exist. (the format of the random name is: _SFXxxx, where xxx is a random number)

%d	The extract directory, or the user-selected directory where files were extracted to.

%e	The directory where the self-extractor is being run from.

%p	The Program Files folder (only available in Windows 95 and NT 4.x and up).

%v	The main system hard disk.

All macros except for the %r macro include the drive letter. The %v macro only contains the drive letter followed by the colon (:) character. None of the macros contains a trailing backslash.


Add method Cmd parameter

The Add method adds, updates, or freshens files in an archive, depending on the value of its Cmd parameter, which can be any one of the following values:

Value	Meaning

xecAll	All the listed files are added to the archive, whether they are already present in the archive or not. If a file to be added is already present in the archive, the file inside the archive will be replaced.

xecFreshen	Only the listed files that are more recent than those already in the archive will be replaced. Does not add any new files to the archive.

xecUpdate	Same as xecFreshen, but adds new files to the archive if they are not already there.


Volume Label

The volume label is a name that can be given to removable or fixed media, such as a floppy disk or a hard disk.


Method

A method is a procedure or function declared inside an object or component.


Program group

In Windows 3.x and NT 3.5x, a program group is a window that appears in the Program Manager, which groups up files in a logical group, and permits files to be executed directly from the program manager. In Windows 95 and NT 4.0, the term "program group" is no longer used, however the equivalent to Program Group is a submenu in the Start Button's programs section.


CRC

Cyclic Redundancy Check. The CRC is a 32-bit checksum system that is used to verify the integrity of data. The Zip archive format calculates the 32-bit CRC of a file before adding it to the archive, then stores the CRC in the archive along with the file. When a file is extracted, the CRC is calculated on the extracted file and compared with the CRC of the original file. If the CRCs are the same, then the extracted file is very probably identical to the original file, because the 32-bit CRC is able to detect single bit variations even in the largest files.


Xceed Zip Current Directory
Current directory

The current directory is the directory from which the program using the Xceed Zip control was executed. Since a program's current directory can change between executions, it is recommended that full pathnames leading to the files to work with are specified. Use caution when specifying only filenames or relative paths, because unforeseen results may occur on the end-user's system. Use your language's Change Directory command (and Change Drive in some cases) to ensure the current directory is what you want it to be.


Xceed Zip Wildcards
Wildcards as interpreted by the Xceed Zip control

Xceed Zip supports the * and ? wildcard characters. The * character matches a sequence of 0 or more characters. The ? character matches exactly one character.

With 16-bit Xceed Zip components, using *.* (alone, or at the end of a specified path) will match all the files and subdirectories encountered. Use the Recurse property to determine whether or not the contents of encountered subdirectories are also processed.

With 32-bit Xceed Zip components, using * will match all the files and subdirectories encountered. Using *.* will only match files and directories that contain a . in them. Use the Recurse property to determine whether or not the contents of encountered subdirectories are also processed.

Wildcard matching is not case sensitive.


Xceed Zip trailing backSlash
Trailing backslash

Trailing backslash is the term used to refer to a backslash at the end of a pathname that is not followed by any more characters. For example, the path 'c:\windows\system' does not have a trailing backslash. The path 'c:\windows\system\' does.