ChilkatZip ActiveX Reference (Visual Basic)

ChilkatZip

Zip compression component.

Chilkat Home
Example Programs

Properties

AppendFromDir
AutoRun
AutoRunParams
AutoTemp
Comment
EncryptKeyLength
Encryption
ErrorLogHtml
ErrorLogText
ErrorLogXml
ExeIconFile
ExeNoInterface
ExeTitle
ExeUnzipCaption
ExeUnzipDir
FileName
NumEntries
PasswordProtect
Proxy
TempDir
Version

Methods

AddEmbedded
AppendBase64
AppendCompressed
AppendData
AppendFiles
AppendFilesEx
AppendHex
AppendMultiple
AppendNew
AppendOneFileOrDir
AppendZip
CloseZip
DeleteEntry
ErrorLogClear
ExcludeDir
Extract
Extract2
ExtractInto
ExtractMatching
ExtractNewer
FirstMatchingEntry
GetDirectoryAsXML
GetEntries
GetEntryByID
GetEntryByIndex
GetEntryByName
GetExclusions
InsertNew
IsPasswordProtected
NewZip
OpenEmbedded
OpenFromMemory
OpenFromWeb
OpenMyEmbedded
OpenZip
RemoveEmbedded
ReplaceEmbedded
SaveXmlLog
SetExclusions
SetPassword
UnlockComponent
Unzip
UnzipInto
UnzipMatching
UnzipMatchingInto
UnzipNewer
WriteExe
WriteToMemory
WriteZip
WriteZipAndClose

Properties

AppendFromDir As String

When files are added to a Zip archive, they are appended from this directory.

AutoRun As String

Undocumented

AutoRunParams As String

Undocumented

AutoTemp As Long

Undocumented

Comment As String

The global Zip file comment.

EncryptKeyLength As Long

The encryption key length if symmetric encryption is used. This value must be 128, 192, or 256.

Encryption As Long

The symmetric encryption algorithm. Valid values are: 0 = none, 1 = blowfish, 2 = twofish, 3 = rijndael (AES). When a Zip is encrypted, the directory will still be readable by programs such as WinZip, but the contents, if unzipped, will be garbled. Only applications using Zip.NET can decrypt and unzip Zip files created by Zip.NET.

ErrorLogHtml As String (read-only)

Undocumented

ErrorLogText As String (read-only)

Undocumented

ErrorLogXml As String (read-only)

Undocumented

ExeIconFile As String

Undocumented

ExeNoInterface As Long

Undocumented

ExeTitle As String

Undocumented

ExeUnzipCaption As String

Undocumented

ExeUnzipDir As String

Undocumented

FileName As String

The name of the Zip file. This file is created or overwritten when the Zip is saved.

NumEntries As Long (read-only)

The number of entries in the Zip, including both files and directories.

PasswordProtect As Long

True if the Zip should be password-protected using standard Zip password-protection.

Proxy As String

(Optional) The name of a proxy to be used with the OpenFromWeb method. Only necessary if your computer uses a proxy to access the Internet.

TempDir As String

The temporary directory to use when unzipping files.

Version As String (read-only)

The version of the component, such as "v9.0.1"

Methods

AddEmbedded(exeFilename As String, resourceName As String, zipFilename As String)

Embeds a Zip file into an EXE as a custom resource. This resource can be opened by the EXE containing it at runtime by using the OpenMyEmbedded method.

AppendBase64(fileName As String, compressedData As String) As ChilkatZipEntry

Creates a new Zip entry and initializes it with already-compressed data that is Base64 encoded. (The ZipEntry.CopyBase64 method can be used to retrieve the compressed data in Base64 format.)

AppendCompressed(fileName As String, data As Variant, dataLen As Long) As ChilkatZipEntry

Append memory data that is already Zip-compressed to the Zip object. The ZipEntry object containing the compressed data is returned.

AppendData(fileName As String, data As Variant, dataLen As Long) As ChilkatZipEntry

Appends in-memory data as a new entry to a Zip object. The ZipEntry object containing the data is returned.

AppendFiles(filePattern As String, recurse As BOOL)

Appends one or more files to the Zip object. The filePattern can use the "*" or "?" wildcard characters. "*" means 0 or more of any character, and "?" means any single character. Set recurse equal to True to recursively add all subdirectories, or False to only add files in the current directory.

AppendFilesEx(filePattern As String, recurse As BOOL, saveExtraPath As BOOL, archiveOnly As BOOL, includeHidden As BOOL, includeSystem As BOOL)

Appends one or more files to the Zip object. The filePattern can use the "*" or "?" wildcard characters. "*" means 0 or more of any character, and "?" means any single character. Set recurse equal to True to recursively add all subdirectories, or False to only add files in the current directory. Other parameters are to control whether or not the full pathname is included with the Zip entry, or whether files with the Archive, Hidden, or System attributes are included. True = yes, False = no.

AppendHex(fileName As String, compressedData As String) As ChilkatZipEntry

Creates a new Zip entry and initializes it with already-compressed data that is hexidecimal encoded. (The ZipEntry.CopyHex method can be used to retrieve the compressed data in Hex format.)

AppendMultiple(fileSpecs As CkStringArray, recurse As BOOL)

This method is the same as calling AppendFiles multiple times - once for each file pattern in fileSpecs

AppendNew(fileName As String) As ChilkatZipEntry

Appends a new and empty entry to the Zip object and returns the ZipEntry object. Data can be appended to the entry by calling ZipEntry.AppendData.

AppendOneFileOrDir(fileOrDirName As String)

Undocumented

AppendZip(ZipFileName As String)

Adds the contents of another existing Zip file to this Zip object.

CloseZip()

Closes an open Zip file. This is identical to calling NewZip. (NewZip closes the current Zip file, if open, and initializes the Zip object to be empty. Zip files are only created when WriteZip is called.)

DeleteEntry(iEntry As ChilkatZipEntry)

Removes a Zip entry from the calling Zip object.

ErrorLogClear()

Clears the last error information that can be retrieved with ErrorLogText, ErrorLogHtml, or ErrorLogXml.

ExcludeDir(dirName As String)

Undocumented

Extract(dirPath As String)

Unzip all the files into the specified directory. Subdirectories are automatically created as needed.

Extract2(dirPath As String) As Long

Undocumented

ExtractInto(dirPath As String)

Unzips all the files in a Zip into a single directory regardless of the path stored in the Zip

ExtractMatching(dirPath As String, pattern As String)

Unzip all files matching a wildcard pattern.

ExtractNewer(dirPath As String)

Extracts only the files that have more recent last-modified-times than the files on disk. This allows you to easily refresh only the files that have been updated.

FirstMatchingEntry(pattern As String) As ChilkatZipEntry

Returns the first entry having a filename matching a pattern. The "*" and "?" characters have their usual wildcard meanings. The full filename, including path, is used when matching against the pattern. A NULL is returned if nothing matches.

GetDirectoryAsXML() As String

Return the contents of the Zip file directory in an XML formatted string

GetEntries() As IChilkatEnum *

Undocumented

GetEntryByID(entryID As Long) As ChilkatZipEntry

Retrieves a ZipEntry by ID. Chilkat Zip.NET automatically assigns a unique ID to each ZipEntry in the Zip. This feature makes it easy to associate an item in a UI control with a ZipEntry.

GetEntryByIndex(index As Long) As ChilkatZipEntry

Retrieves a ZipEntry by index. The first entry is at index 0. This will return directory entries as well as files.

GetEntryByName(entryName As String) As ChilkatZipEntry

Returns a ZipEntry by filename. If a full or partial path is part of the filename, this must be included in the filename parameter.

GetExclusions() As CkStringArray

Returns the current collection of exclusion patterns that have been set by SetExclusions.

InsertNew(fileName As String, beforeIndex As Long) As ChilkatZipEntry

Inserts a new and empty entry into the Zip object. To insert at the beginning of the Zip, beforeIndex should be 0. The ZipEntry's FileName property is initialized to fileName parameter.

IsPasswordProtected(zipFilename As String, out As [, pVal As retval ] long *)

Return True if a Zip file is password protected

NewZip(ZipFileName As String)

Clears and initializes the contents of the Zip object. If a Zip file was open, it is closed and all entries are removed from the object. The FileName property is set to the filename parameter.

OpenEmbedded(exeFilename As String, resourceName As String)

Opens a Zip embedded in an EXE

OpenFromMemory(zipFileInMemory As Variant)

Open a Zip that is completely in-memory. This allows for Zip files to be opened from non-filesystem sources, such as a database.

OpenFromWeb(url As String) As Long

Opens a Zip directly from a URL. The entire contents of the Zip are downloaded and loaded into memory before returning.

OpenMyEmbedded(resourceName As String)

Opens a Zip embedded within the caller's EXE.

OpenZip(ZipFileName As String)

Open a Zip file

RemoveEmbedded(exeFilename As String, resourceName As String)

Removes an embedded Zip from an EXE

ReplaceEmbedded(exeFilename As String, resourceName As String, zipFilename As String)

Replace a Zip embedded in an EXE with another Zip file.

SaveXmlLog(filename As String)

Saves the log to an XML formatted file. The log contains both error and informational messages for the last method called.

SetExclusions(excludePatterns As CkStringArray)

Specify a collection of exclusion patterns to be used when adding files to a Zip. Each pattern in the collection can use the "*" and "?" wildcard characters, where "*" indicates 0 or more occurances of any character, and "?" represents exactly one occurance of any character.

SetPassword(password As String)

Set the password for an encrypted or password-protected Zip.

UnlockComponent(regCode As String)

Unlocks the component allowing for the full functionality to be used. Returns true if the unlock code is valid.

Unzip(dirPath As String) As Long

Undocumented

UnzipInto(dirPath As String) As Long

Undocumented

UnzipMatching(dirPath As String, pattern As String, verbose As Long) As Long

Undocumented

UnzipMatchingInto(dirPath As String, pattern As String, verbose As Long) As Long

Undocumented

UnzipNewer(dirPath As String) As Long

Undocumented

WriteExe(exeFilename As String) As Long

Saves the Zip to a self-extracting executable.

WriteToMemory() As Variant

Undocumented

WriteZip()

Saves the Zip to a file and implictly re-opens it so further operations can continue. Use WriteZipAndClose to write and close the Zip.

WriteZipAndClose() As Long

Saves the Zip to a file and closes it. On return, the Zip object will be in the state as if NewZip had been called.

Copyright 2000-2006 Chilkat Software, Inc.