Xceed Zip Compression Library Documentation
DLL API additional notes for VB
Direct DLL API > DLL API additional notes for VB

When using the DLL API in VB, you will need to include the XCDDLLAPI.BAS file (included in the "DLL API" folder where you installed Xceed Zip v5.0) into your project. The file contains all the function, event and constant declarations for using the DLL API in VB 4, 5 and 6. Once that is done, you can initialize and destroy an instance of XceedZip or XceedCompression at any time with the following code:

Visual Basic Copy Code
Call XceedZipInitDLL
Call XceedZipShutdownDLL

Once the DLL is initialized, you then need to get a handle on an instance of Xceed Zip, and release it once you are finished with it. In VB, you can do this with the following code. The "hZip" variable

Visual Basic Copy Code

Dim hZip As Long

hZip = XzCreateXceedZipA( "" ) ' When registered, put your license key here, instead of an empty string.
Call XzDestroyXceedZip( hZip )

Once you have created an instance of an Xceed Zip control, you can begin setting properties and calling methods. As an example, the following code shows how to set the zip filename and the files to process:

Visual Basic Copy Code
Call XzSetZipFilenameA( hZip, txtZipFilename.Text )
Call XzSetFilesToProcessA( hZip, txtFilesToProcess.Text )