Xceed Zip Compression Library Documentation
DLL API Initialization and Instanciation
Direct DLL API > DLL API Initialization and Instanciation

Initialization

The XCEEDZIP.DLL must be initialized before it can be used via the DLL API interface. To do this, call the XceedZipInitDLL function. When you are finished using the DLL, you must call the XceedZipShutdownDLL function.

The operating system loads the XCEEDZIP.DLL in memory when you call the XceedZipInitDLL function. We recommend calling the XceedZipInitDLL function at the beginning of your program, so that if there is a problem loading the DLL, you will know about it immediately. However, you can postpone the DLL loading point by calling the XceedZipInitDLL function immediately before accessing the API interface in your code. Note: There is no danger in calling XceedZipInitDLL more than once, as long as there are the same number of calls to XceedZipShutdownDLL.

Instantiation

When you’re done with initializing the DLL API interface, you then need to get a handle to an XceedZip object with a call to XzCreateXceedZip, or a handle to an XceedCompression object, with a call to XcCreateXceedCompression. All DLL API functions that represent a property or a method require a handle to an instance of an XceedZip or XceedCompression object.

The XzCreateXceedZIp and XcCreateXceedCompression functions are defined as both ANSI (XzCreateXceedZipA) and UNICODE (XzCreateXceedZipW). Depending on which of these instantiation functions gets called, events triggered by the objects will report strings in either ANSI (char *) or UNICODE (WCHAR *).

When you have completed all operations with the object, you must call XzDestroyXceedZip or XcDestroyXceedCompression to free the object.