ZipSFX Class

Properties   Methods   Events   Config Settings   Errors  

The ZipSFX class implements a PKZip-compatible Zip compressor to create a self-extracting archive which will run natively on Windows platforms.

Syntax

ZipSFX

Remarks

The class uses the Deflate algorithm specified in RFC 1951 for compression, and then creates a self-extracting executable archive. This exe will bring up a dialog that will allow the user to select the target directory in which to decompress the files. There is also an optional splash screen that may be displayed before decompression. The text for this splash screen may be set with the BannerText property. You can also set the text that appears on the title bar of each dialog box using the CaptionText property.

Example (Creating a Self-Extracting Archive)

class.ArchiveFile = "c:\test.exe" class.RecurseSubdirectories = true class.SourceDirectory = "c:\foo\" class.CaptionText = "Testing ZipSFX" class.BannerText = "Press continue to decompress the archive." class.CreateSFX()

Note: When creating a self-extracting archive which exceeds 4 GB or more of uncompressed data or which contains more than 64K files, the class will create a 64-bit Zip archive.

The self-extracting archive that is created by the ZipSFX class is a Windows application. However, there are command line options available if you wish to batch multiple files. The options are:

Option NameDescription
targetpathPath to decompress the archive to. This overrides the ExtractToPath. "." indicates the current directory (if no ExtractToPath was specified and no targetpath is given, the archive is decompressed to the current directory).
overwriteIf set to true, the archive will automatically overwrite existing files (thus suppressing the message box asking you to overwrite or not)
displaymessageIf set to false, it will suppress the display of the "Extraction Complete" message after the archive has finished (this may also be accomplished by setting the CompleteMessage config setting to "").
openfileIf set to false, this option will override opening the file indicated by FileToExecute. (Alternatively, set FileToExecute to "").
passwordThe password used to decrypt the archive. If the archive is not encrypted this option is ignored. However if the archive is encrypted and no password is supplied, decompression will fail.

For example, the following suppresses all questions and message boxes, and decompress to the current directory, use the following options: ZipExtractor /targetpath="." /overwrite=1 /displaymessage=0 /openfile=0 /password=pass

Note that if you run the self-extracting archive with any command line options, the pop up message box containing the BannerText will be suppressed.

Property List


The following is the full list of the properties of the class with short descriptions. Click on the links for further details.

ArchiveFileThe name of the self-extracting zip archive to create.
BannerTextOptional banner text to show before the self-extraction starts.
CaptionTextOptional caption (title) text for the self-extractor dialogs.
CompressionLevelThe compression level to use.
ExtractToPathOptional target directory for the self-extractor.
FileToExecuteOptional file to execute (open) after the archive is extracted.
PasswordAn optional password for the self-extracting archive.
RecurseSubdirectoriesWhether or not to recurse into subdirectories during archive creation.
SourceDirectoryDirectory to be compressed into a self-extracting archive.

Method List


The following is the full list of the methods of the class with short descriptions. Click on the links for further details.

ConfigSets or retrieves a configuration setting.
CreateSFXCompresses the files and creates a self-extracting archive.
ResetResets the class.

Event List


The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.

ErrorInformation about non-fatal errors.
ProgressFired as progress is made.

Config Settings


The following is a list of config settings for the class with short descriptions. Click on the links for further details.

CompleteMessageMessage to notify user that extraction has finished normally.
ExtractorStubPath to optional self-extractor executable stub.
FileToExecuteParamsList of parameters to pass to FileToExecute.
InstallationModeThis setting will install to ExtractToPath, run FileToExecute, and then remove the extracted files.
RequireAdminPrivsSpecifies whether the created executable requires Administrator privileges.
SilentExtractionSpecifies whether the archive should hide all UI interaction while extracting.
BuildInfoInformation about the product's build.
CodePageThe system code page used for Unicode to Multibyte translations.
LicenseInfoInformation about the current license.
MaskSensitiveWhether sensitive data is masked in log messages.
ProcessIdleEventsWhether the class uses its internal event loop to process events when the main thread is idle.
SelectWaitMillisThe length of time in milliseconds the class will wait when DoEvents is called if there are no events to process.
UseInternalSecurityAPITells the class whether or not to use the system security libraries or an internal implementation.

ArchiveFile Property (ZipSFX Class)

The name of the self-extracting zip archive to create.

Syntax

ANSI (Cross Platform)
char* GetArchiveFile();
int SetArchiveFile(const char* lpszArchiveFile); Unicode (Windows) LPWSTR GetArchiveFile();
INT SetArchiveFile(LPCWSTR lpszArchiveFile);
char* ipworkszip_zipsfx_getarchivefile(void* lpObj);
int ipworkszip_zipsfx_setarchivefile(void* lpObj, const char* lpszArchiveFile);
QString GetArchiveFile();
int SetArchiveFile(QString qsArchiveFile);

Default Value

""

Remarks

This property specifies the name of the archive to be written when CreateSFX is called. Any pre-existing archive file will be overwritten.

The filename may be specified with or without a path. Paths may be relative or absolute, and should be specified in the format native to the host operating system. The filename should be specified with the appropriate ".exe" extension. An extension will not automatically be appended by the class.

If the file cannot be written a trappable error will be generated.

Example (Creating a Self-Extracting Archive)

class.ArchiveFile = "c:\test.exe" class.RecurseSubdirectories = true class.SourceDirectory = "c:\foo\" class.CaptionText = "Testing ZipSFX" class.BannerText = "Press continue to decompress the archive." class.CreateSFX()

Note: When creating a self-extracting archive which exceeds 4 GB or more of uncompressed data or which contains more than 64K files, the class will create a 64-bit Zip archive.

Data Type

String

BannerText Property (ZipSFX Class)

Optional banner text to show before the self-extraction starts.

Syntax

ANSI (Cross Platform)
char* GetBannerText();
int SetBannerText(const char* lpszBannerText); Unicode (Windows) LPWSTR GetBannerText();
INT SetBannerText(LPCWSTR lpszBannerText);
char* ipworkszip_zipsfx_getbannertext(void* lpObj);
int ipworkszip_zipsfx_setbannertext(void* lpObj, const char* lpszBannerText);
QString GetBannerText();
int SetBannerText(QString qsBannerText);

Default Value

""

Remarks

If this property is set, a dialog box will pop up displaying the contents of this property as soon as the SFX executable is run. If this property is set to an empty string (default) no banner dialog will be displayed.

Example (Creating a Self-Extracting Archive)

class.ArchiveFile = "c:\test.exe" class.RecurseSubdirectories = true class.SourceDirectory = "c:\foo\" class.CaptionText = "Testing ZipSFX" class.BannerText = "Press continue to decompress the archive." class.CreateSFX()

Data Type

String

CaptionText Property (ZipSFX Class)

Optional caption (title) text for the self-extractor dialogs.

Syntax

ANSI (Cross Platform)
char* GetCaptionText();
int SetCaptionText(const char* lpszCaptionText); Unicode (Windows) LPWSTR GetCaptionText();
INT SetCaptionText(LPCWSTR lpszCaptionText);
char* ipworkszip_zipsfx_getcaptiontext(void* lpObj);
int ipworkszip_zipsfx_setcaptiontext(void* lpObj, const char* lpszCaptionText);
QString GetCaptionText();
int SetCaptionText(QString qsCaptionText);

Default Value

""

Remarks

This property contains the text which will appear on the title bar of the dialog boxes that appear when running the SFX executable file. If this property is not set, "IPWorks Zip Self Extractor - www.nsoftware.com" will appear in the title bar.

Example (Creating a Self-Extracting Archive)

class.ArchiveFile = "c:\test.exe" class.RecurseSubdirectories = true class.SourceDirectory = "c:\foo\" class.CaptionText = "Testing ZipSFX" class.BannerText = "Press continue to decompress the archive." class.CreateSFX()

Data Type

String

CompressionLevel Property (ZipSFX Class)

The compression level to use.

Syntax

ANSI (Cross Platform)
int GetCompressionLevel();
int SetCompressionLevel(int iCompressionLevel); Unicode (Windows) INT GetCompressionLevel();
INT SetCompressionLevel(INT iCompressionLevel);
int ipworkszip_zipsfx_getcompressionlevel(void* lpObj);
int ipworkszip_zipsfx_setcompressionlevel(void* lpObj, int iCompressionLevel);
int GetCompressionLevel();
int SetCompressionLevel(int iCompressionLevel);

Default Value

4

Remarks

This property specifies the level of compression to be used, between 0 and 6. Higher values will cause the class to compress better; lower values will cause the class to compress faster. A value of 0 will store the file without compression.

Data Type

Integer

ExtractToPath Property (ZipSFX Class)

Optional target directory for the self-extractor.

Syntax

ANSI (Cross Platform)
char* GetExtractToPath();
int SetExtractToPath(const char* lpszExtractToPath); Unicode (Windows) LPWSTR GetExtractToPath();
INT SetExtractToPath(LPCWSTR lpszExtractToPath);
char* ipworkszip_zipsfx_getextracttopath(void* lpObj);
int ipworkszip_zipsfx_setextracttopath(void* lpObj, const char* lpszExtractToPath);
QString GetExtractToPath();
int SetExtractToPath(QString qsExtractToPath);

Default Value

""

Remarks

If set to empty string (default), the self-extractor will attempt to extract files into a subdirectory of the directory it is being executed from.

The name of the subdirectory is derived from the name of the self-extracting archive by removing its extension.

Data Type

String

FileToExecute Property (ZipSFX Class)

Optional file to execute (open) after the archive is extracted.

Syntax

ANSI (Cross Platform)
char* GetFileToExecute();
int SetFileToExecute(const char* lpszFileToExecute); Unicode (Windows) LPWSTR GetFileToExecute();
INT SetFileToExecute(LPCWSTR lpszFileToExecute);
char* ipworkszip_zipsfx_getfiletoexecute(void* lpObj);
int ipworkszip_zipsfx_setfiletoexecute(void* lpObj, const char* lpszFileToExecute);
QString GetFileToExecute();
int SetFileToExecute(QString qsFileToExecute);

Default Value

"."

Remarks

This property specifies an executable file which will be run after the archive has completed decompressing. This must be a relative path to a file located within ExtractToPath. If this property is set to ".", the folder to which the archive has been decompressed will open in Windows Explorer. If this property is set to "" (empty string), the extractor will close and take no action.

Data Type

String

Password Property (ZipSFX Class)

An optional password for the self-extracting archive.

Syntax

ANSI (Cross Platform)
char* GetPassword();
int SetPassword(const char* lpszPassword); Unicode (Windows) LPWSTR GetPassword();
INT SetPassword(LPCWSTR lpszPassword);
char* ipworkszip_zipsfx_getpassword(void* lpObj);
int ipworkszip_zipsfx_setpassword(void* lpObj, const char* lpszPassword);
QString GetPassword();
int SetPassword(QString qsPassword);

Default Value

""

Remarks

This property specifies a case-sensitive password used to encrypt or decrypt the archive. If set to an empty string (default), no encryption is used.

The maximum supported length of the password is 128 characters.

Example (compressing an SFX archive):

class.ArchiveFile = "c:\test.exe" class.RecurseSubdirectories = true class.SourceDirectory = "c:\foo" class.Password = "nsoftware" class.CreateSFX()

Data Type

String

RecurseSubdirectories Property (ZipSFX Class)

Whether or not to recurse into subdirectories during archive creation.

Syntax

ANSI (Cross Platform)
int GetRecurseSubdirectories();
int SetRecurseSubdirectories(int bRecurseSubdirectories); Unicode (Windows) BOOL GetRecurseSubdirectories();
INT SetRecurseSubdirectories(BOOL bRecurseSubdirectories);
int ipworkszip_zipsfx_getrecursesubdirectories(void* lpObj);
int ipworkszip_zipsfx_setrecursesubdirectories(void* lpObj, int bRecurseSubdirectories);
bool GetRecurseSubdirectories();
int SetRecurseSubdirectories(bool bRecurseSubdirectories);

Default Value

TRUE

Remarks

If this property is set to true, when calling CreateSFX the class will recurse into all the subdirectories under SourceDirectory and include them in the self extracting archive. If this property is false, only the files in SourceDirectory will be included in the archive.

Data Type

Boolean

SourceDirectory Property (ZipSFX Class)

Directory to be compressed into a self-extracting archive.

Syntax

ANSI (Cross Platform)
char* GetSourceDirectory();
int SetSourceDirectory(const char* lpszSourceDirectory); Unicode (Windows) LPWSTR GetSourceDirectory();
INT SetSourceDirectory(LPCWSTR lpszSourceDirectory);
char* ipworkszip_zipsfx_getsourcedirectory(void* lpObj);
int ipworkszip_zipsfx_setsourcedirectory(void* lpObj, const char* lpszSourceDirectory);
QString GetSourceDirectory();
int SetSourceDirectory(QString qsSourceDirectory);

Default Value

""

Remarks

This property specifies the name of the directory containing the files to be compressed. This may be a local or absolute path. If the RecurseSubdirectories property is true, all the subdirectories under SourceDirectory will be recursed into, and those files will also be compressed.

Example (Creating a Self-Extracting Archive)

class.ArchiveFile = "c:\test.exe" class.RecurseSubdirectories = true class.SourceDirectory = "c:\foo\" class.CaptionText = "Testing ZipSFX" class.BannerText = "Press continue to decompress the archive." class.CreateSFX()

Data Type

String

Config Method (ZipSFX Class)

Sets or retrieves a configuration setting.

Syntax

ANSI (Cross Platform)
char* Config(const char* lpszConfigurationString);

Unicode (Windows)
LPWSTR Config(LPCWSTR lpszConfigurationString);
char* ipworkszip_zipsfx_config(void* lpObj, const char* lpszConfigurationString);
QString Config(const QString& qsConfigurationString);

Remarks

Config is a generic method available in every class. It is used to set and retrieve configuration settings for the class.

These settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the class, access to these internal properties is provided through the Config method.

To set a configuration setting named PROPERTY, you must call Config("PROPERTY=VALUE"), where VALUE is the value of the setting expressed as a string. For boolean values, use the strings "True", "False", "0", "1", "Yes", or "No" (case does not matter).

To read (query) the value of a configuration setting, you must call Config("PROPERTY"). The value will be returned as a string.

Error Handling (C++)

This method returns a String value; after it returns, call the GetLastErrorCode() method to obtain its result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.

CreateSFX Method (ZipSFX Class)

Compresses the files and creates a self-extracting archive.

Syntax

ANSI (Cross Platform)
int CreateSFX();

Unicode (Windows)
INT CreateSFX();
int ipworkszip_zipsfx_createsfx(void* lpObj);
int CreateSFX();

Remarks

Invoking CreateSFX creates the archive specified by ArchiveFile. When the method is called, all files specified by SourceDirectory will be compressed and written to ArchiveFile. If RecurseSubdirectories is true, all the subdirectories under SourceDirectory and the files they contain will also be compressed and written to ArchiveFile.

If ArchiveFile exists when you call CreateSFX it will be overwritten.

As the files in SourceDirectory are being compressed, the Progress event will fire periodically to indicate how many bytes have been processed and the percentage of compression that has been completed.

To include your own custom text on the title bar of all of the self-extractor dialog boxes, set the CaptionText before calling CreateSFX. Setting the optional BannerText property will cause a small dialog to pop up when the self-extractor is run. You can put in a description of the contents, instructions, or any text you like.

Example (Creating a Self-Extracting Archive)

class.ArchiveFile = "c:\test.exe" class.RecurseSubdirectories = true class.SourceDirectory = "c:\foo\" class.CaptionText = "Testing ZipSFX" class.BannerText = "Press continue to decompress the archive." class.CreateSFX()

Note: When creating a self-extracting archive which exceeds 4 GB or more of uncompressed data or which contains more than 64K files, the class will create a 64-bit Zip archive.

The self-extracting archive that is created by the ZipSFX class is a Windows application. However, there are command line options available if you wish to batch multiple files. The options are:

Option NameDescription
targetpathPath to decompress the archive to. This overrides the ExtractToPath. "." indicates the current directory (if no ExtractToPath was specified and no targetpath is given, the archive is decompressed to the current directory).
overwriteIf set to true, the archive will automatically overwrite existing files (thus suppressing the message box asking you to overwrite or not)
displaymessageIf set to false, it will suppress the display of the "Extraction Complete" message after the archive has finished (this may also be accomplished by setting the CompleteMessage config setting to "").
openfileIf set to false, this option will override opening the file indicated by FileToExecute. (Alternatively, set FileToExecute to "").
passwordThe password used to decrypt the archive. If the archive is not encrypted this option is ignored. However if the archive is encrypted and no password is supplied, decompression will fail.

For example, the following suppresses all questions and message boxes, and decompress to the current directory, use the following options: ZipExtractor /targetpath="." /overwrite=1 /displaymessage=0 /openfile=0 /password=pass

Note that if you run the self-extracting archive with any command line options, the pop up message box containing the BannerText will be suppressed.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

Reset Method (ZipSFX Class)

Resets the class.

Syntax

ANSI (Cross Platform)
int Reset();

Unicode (Windows)
INT Reset();
int ipworkszip_zipsfx_reset(void* lpObj);
int Reset();

Remarks

Reset resets the state of the class. All properties will be set to their default values, and any files open will be closed.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

Error Event (ZipSFX Class)

Information about non-fatal errors.

Syntax

ANSI (Cross Platform)
virtual int FireError(ZipSFXErrorEventParams *e);
typedef struct {
const char *Description;
int ErrorCode;
int Index;
const char *Filename;
int Ignore; int reserved; } ZipSFXErrorEventParams;
Unicode (Windows) virtual INT FireError(ZipSFXErrorEventParams *e);
typedef struct {
LPCWSTR Description;
INT ErrorCode;
INT Index;
LPCWSTR Filename;
BOOL Ignore; INT reserved; } ZipSFXErrorEventParams;
#define EID_ZIPSFX_ERROR 1

virtual INT IPWORKSZIP_CALL FireError(LPSTR &lpszDescription, INT &iErrorCode, INT &iIndex, LPSTR &lpszFilename, BOOL &bIgnore);
class ZipSFXErrorEventParams {
public:
  const QString &Description();

  int ErrorCode();

  int Index();

  const QString &Filename();

  bool Ignore();
  void SetIgnore(bool bIgnore);

  int EventRetVal();
  void SetEventRetVal(int iRetVal);
};
// To handle, connect one or more slots to this signal. void Error(ZipSFXErrorEventParams *e);
// Or, subclass ZipSFX and override this emitter function. virtual int FireError(ZipSFXErrorEventParams *e) {...}

Remarks

The Error event is fired when non-fatal errors occur during compression or decompression. Note that if this event is fired during decompression this may indicate that the archive is corrupt.

By default these errors will cause the component to fail with an exception. The exception may be overridden by setting Ignore to true. This will cause the error to be ignored, the file will be skipped if necessary, and the class will continue operation.

ErrorCode will correspond to one of the following errors:

1Bad or missing CRC-32 checksum.
2Failed to set creation date of a file.
111Can't open file for read (skipping).

Description contains a textual description of the error. Index and Filename contain the array index (where appropriate) and filename of the file being processed at the time of the error.

Progress Event (ZipSFX Class)

Fired as progress is made.

Syntax

ANSI (Cross Platform)
virtual int FireProgress(ZipSFXProgressEventParams *e);
typedef struct {
const char *Filename;
int64 BytesProcessed;
int PercentProcessed; int reserved; } ZipSFXProgressEventParams;
Unicode (Windows) virtual INT FireProgress(ZipSFXProgressEventParams *e);
typedef struct {
LPCWSTR Filename;
LONG64 BytesProcessed;
INT PercentProcessed; INT reserved; } ZipSFXProgressEventParams;
#define EID_ZIPSFX_PROGRESS 2

virtual INT IPWORKSZIP_CALL FireProgress(LPSTR &lpszFilename, LONG64 &lBytesProcessed, INT &iPercentProcessed);
class ZipSFXProgressEventParams {
public:
  const QString &Filename();

  qint64 BytesProcessed();

  int PercentProcessed();

  int EventRetVal();
  void SetEventRetVal(int iRetVal);
};
// To handle, connect one or more slots to this signal. void Progress(ZipSFXProgressEventParams *e);
// Or, subclass ZipSFX and override this emitter function. virtual int FireProgress(ZipSFXProgressEventParams *e) {...}

Remarks

The Progress event is automatically fired as compression is performed.

Filename contains the name of the file being written.

BytesProcessed contains the total number of uncompressed bytes processed.

PercentProcessed contains the percent of uncompressed bytes processed, corresponding roughly to the running time of the operation.

Config Settings (ZipSFX Class)

The class accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the class, access to these internal properties is provided through the Config method.

ZipSFX Config Settings

CompleteMessage:   Message to notify user that extraction has finished normally.

When the self-extracting executable created by this class successfully finishes extracting the files contained within itself, it may optionally display a Message Box indicating that it's finished. By default, the message "Extraction Complete." is displayed. You may change this to your own custom message. However, any message longer than 400 characters will be truncated. To disable this message, set the CompleteMessage configuration setting to "" (empty string).

ExtractorStub:   Path to optional self-extractor executable stub.

Normally the class loads a self-extractor stub from an internal resource and uses it to create the self-extracting executable.

If a path is specified in this setting, the file indicated by that path is used instead.

This setting allows you to specify a custom self-extractor. The compiled self-extractor stub is available on demand. Resources such as icons and text may then be modified.

This may also be used to specify if the resulting executable should be 32 bit or 64 bit by setting this to either "*32bit" or "*64bit".

FileToExecuteParams:   List of parameters to pass to FileToExecute.

This setting allows you to pass command-line parameters to the executable file indicated by FileToExecute. Parameters should be in the form of a space-separated list.

InstallationMode:   This setting will install to ExtractToPath, run FileToExecute, and then remove the extracted files.

Is set to true, this setting makes the self-extractor behave as an installer by installing to a temp directory, running the desired executable, and removing the extracted files upon completion. The default value is false.

RequireAdminPrivs:   Specifies whether the created executable requires Administrator privileges.

This setting specifies whether the executable created by the class requires Administrator privileges to execute.

This setting is false by default.

SilentExtraction:   Specifies whether the archive should hide all UI interaction while extracting.

This setting specifies whether to hide the progress bar and success window when the archive executable is run. Setting this config to true is equivalent to passing the '/s' command-line parameter to the archive executable.

This setting is false by default.

Base Config Settings

BuildInfo:   Information about the product's build.

When queried, this setting will return a string containing information about the product's build.

CodePage:   The system code page used for Unicode to Multibyte translations.

The default code page is Unicode UTF-8 (65001).

The following is a list of valid code page identifiers:

IdentifierName
037IBM EBCDIC - U.S./Canada
437OEM - United States
500IBM EBCDIC - International
708Arabic - ASMO 708
709Arabic - ASMO 449+, BCON V4
710Arabic - Transparent Arabic
720Arabic - Transparent ASMO
737OEM - Greek (formerly 437G)
775OEM - Baltic
850OEM - Multilingual Latin I
852OEM - Latin II
855OEM - Cyrillic (primarily Russian)
857OEM - Turkish
858OEM - Multilingual Latin I + Euro symbol
860OEM - Portuguese
861OEM - Icelandic
862OEM - Hebrew
863OEM - Canadian-French
864OEM - Arabic
865OEM - Nordic
866OEM - Russian
869OEM - Modern Greek
870IBM EBCDIC - Multilingual/ROECE (Latin-2)
874ANSI/OEM - Thai (same as 28605, ISO 8859-15)
875IBM EBCDIC - Modern Greek
932ANSI/OEM - Japanese, Shift-JIS
936ANSI/OEM - Simplified Chinese (PRC, Singapore)
949ANSI/OEM - Korean (Unified Hangul Code)
950ANSI/OEM - Traditional Chinese (Taiwan; Hong Kong SAR, PRC)
1026IBM EBCDIC - Turkish (Latin-5)
1047IBM EBCDIC - Latin 1/Open System
1140IBM EBCDIC - U.S./Canada (037 + Euro symbol)
1141IBM EBCDIC - Germany (20273 + Euro symbol)
1142IBM EBCDIC - Denmark/Norway (20277 + Euro symbol)
1143IBM EBCDIC - Finland/Sweden (20278 + Euro symbol)
1144IBM EBCDIC - Italy (20280 + Euro symbol)
1145IBM EBCDIC - Latin America/Spain (20284 + Euro symbol)
1146IBM EBCDIC - United Kingdom (20285 + Euro symbol)
1147IBM EBCDIC - France (20297 + Euro symbol)
1148IBM EBCDIC - International (500 + Euro symbol)
1149IBM EBCDIC - Icelandic (20871 + Euro symbol)
1200Unicode UCS-2 Little-Endian (BMP of ISO 10646)
1201Unicode UCS-2 Big-Endian
1250ANSI - Central European
1251ANSI - Cyrillic
1252ANSI - Latin I
1253ANSI - Greek
1254ANSI - Turkish
1255ANSI - Hebrew
1256ANSI - Arabic
1257ANSI - Baltic
1258ANSI/OEM - Vietnamese
1361Korean (Johab)
10000MAC - Roman
10001MAC - Japanese
10002MAC - Traditional Chinese (Big5)
10003MAC - Korean
10004MAC - Arabic
10005MAC - Hebrew
10006MAC - Greek I
10007MAC - Cyrillic
10008MAC - Simplified Chinese (GB 2312)
10010MAC - Romania
10017MAC - Ukraine
10021MAC - Thai
10029MAC - Latin II
10079MAC - Icelandic
10081MAC - Turkish
10082MAC - Croatia
12000Unicode UCS-4 Little-Endian
12001Unicode UCS-4 Big-Endian
20000CNS - Taiwan
20001TCA - Taiwan
20002Eten - Taiwan
20003IBM5550 - Taiwan
20004TeleText - Taiwan
20005Wang - Taiwan
20105IA5 IRV International Alphabet No. 5 (7-bit)
20106IA5 German (7-bit)
20107IA5 Swedish (7-bit)
20108IA5 Norwegian (7-bit)
20127US-ASCII (7-bit)
20261T.61
20269ISO 6937 Non-Spacing Accent
20273IBM EBCDIC - Germany
20277IBM EBCDIC - Denmark/Norway
20278IBM EBCDIC - Finland/Sweden
20280IBM EBCDIC - Italy
20284IBM EBCDIC - Latin America/Spain
20285IBM EBCDIC - United Kingdom
20290IBM EBCDIC - Japanese Katakana Extended
20297IBM EBCDIC - France
20420IBM EBCDIC - Arabic
20423IBM EBCDIC - Greek
20424IBM EBCDIC - Hebrew
20833IBM EBCDIC - Korean Extended
20838IBM EBCDIC - Thai
20866Russian - KOI8-R
20871IBM EBCDIC - Icelandic
20880IBM EBCDIC - Cyrillic (Russian)
20905IBM EBCDIC - Turkish
20924IBM EBCDIC - Latin-1/Open System (1047 + Euro symbol)
20932JIS X 0208-1990 & 0121-1990
20936Simplified Chinese (GB2312)
21025IBM EBCDIC - Cyrillic (Serbian, Bulgarian)
21027Extended Alpha Lowercase
21866Ukrainian (KOI8-U)
28591ISO 8859-1 Latin I
28592ISO 8859-2 Central Europe
28593ISO 8859-3 Latin 3
28594ISO 8859-4 Baltic
28595ISO 8859-5 Cyrillic
28596ISO 8859-6 Arabic
28597ISO 8859-7 Greek
28598ISO 8859-8 Hebrew
28599ISO 8859-9 Latin 5
28605ISO 8859-15 Latin 9
29001Europa 3
38598ISO 8859-8 Hebrew
50220ISO 2022 Japanese with no halfwidth Katakana
50221ISO 2022 Japanese with halfwidth Katakana
50222ISO 2022 Japanese JIS X 0201-1989
50225ISO 2022 Korean
50227ISO 2022 Simplified Chinese
50229ISO 2022 Traditional Chinese
50930Japanese (Katakana) Extended
50931US/Canada and Japanese
50933Korean Extended and Korean
50935Simplified Chinese Extended and Simplified Chinese
50936Simplified Chinese
50937US/Canada and Traditional Chinese
50939Japanese (Latin) Extended and Japanese
51932EUC - Japanese
51936EUC - Simplified Chinese
51949EUC - Korean
51950EUC - Traditional Chinese
52936HZ-GB2312 Simplified Chinese
54936Windows XP: GB18030 Simplified Chinese (4 Byte)
57002ISCII Devanagari
57003ISCII Bengali
57004ISCII Tamil
57005ISCII Telugu
57006ISCII Assamese
57007ISCII Oriya
57008ISCII Kannada
57009ISCII Malayalam
57010ISCII Gujarati
57011ISCII Punjabi
65000Unicode UTF-7
65001Unicode UTF-8
The following is a list of valid code page identifiers for Mac OS only:
IdentifierName
1ASCII
2NEXTSTEP
3JapaneseEUC
4UTF8
5ISOLatin1
6Symbol
7NonLossyASCII
8ShiftJIS
9ISOLatin2
10Unicode
11WindowsCP1251
12WindowsCP1252
13WindowsCP1253
14WindowsCP1254
15WindowsCP1250
21ISO2022JP
30MacOSRoman
10UTF16String
0x90000100UTF16BigEndian
0x94000100UTF16LittleEndian
0x8c000100UTF32String
0x98000100UTF32BigEndian
0x9c000100UTF32LittleEndian
65536Proprietary

LicenseInfo:   Information about the current license.

When queried, this setting will return a string containing information about the license this instance of a class is using. It will return the following information:

  • Product: The product the license is for.
  • Product Key: The key the license was generated from.
  • License Source: Where the license was found (e.g., RuntimeLicense, License File).
  • License Type: The type of license installed (e.g., Royalty Free, Single Server).
  • Last Valid Build: The last valid build number for which the license will work.
MaskSensitive:   Whether sensitive data is masked in log messages.

In certain circumstances it may be beneficial to mask sensitive data, like passwords, in log messages. Set this to true to mask sensitive data. The default is true.

This setting only works on these classes: AS3Receiver, AS3Sender, Atom, Client(3DS), FTP, FTPServer, IMAP, OFTPClient, SSHClient, SCP, Server(3DS), Sexec, SFTP, SFTPServer, SSHServer, TCPClient, TCPServer.

ProcessIdleEvents:   Whether the class uses its internal event loop to process events when the main thread is idle.

If set to False, the class will not fire internal idle events. Set this to False to use the class in a background thread on Mac OS. By default, this setting is True.

SelectWaitMillis:   The length of time in milliseconds the class will wait when DoEvents is called if there are no events to process.

If there are no events to process when DoEvents is called, the class will wait for the amount of time specified here before returning. The default value is 20.

UseInternalSecurityAPI:   Whether or not to use the system security libraries or an internal implementation.

When set to false, the class will use the system security libraries by default to perform cryptographic functions where applicable.

Setting this configuration setting to true tells the class to use the internal implementation instead of using the system security libraries.

On Windows, this setting is set to false by default. On Linux/macOS, this setting is set to true by default.

To use the system security libraries for Linux, OpenSSL support must be enabled. For more information on how to enable OpenSSL, please refer to the OpenSSL Notes section.

Trappable Errors (ZipSFX Class)

Error Handling (C++)

Call the GetLastErrorCode() method to obtain the last called method's result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. Known error codes are listed below. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.

Errors

The following errors may be generated by the class. Note that frequently the error message will contain more specific information than what is listed here.

Note that some non-fatal errors may be trapped and explicitly ignored in the Error event. This will allow the class to continue operation even in case of error.

ZipSFX Errors

111   Can't open file for read.
112   Can't open file for write.
115   Can't create empty archive.
118   The maximum size of the archive has been exceeded.
119   The archive must be specified.
120   The component is busy.
150   An I/O error has occurred (details follow).
151   Cannot find resource (details follow).
152   Cannot update resource (details follow).