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 |
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 |
---|---|
|
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 ) |