Codex Overview

MimarSinan Codex 2.2: Overview

Welcome to MimarSinan Codex Plug-In Technology 2.2

Codex Plug-In Technology is the first and only plug-in based, cross-application, and cross-archive data (de)compression solution.

This document contains information on the Codex Plug-In Technology, enabling you to engineer your own Codex Plug-Ins and Codex Applications. Please review the definitions below before you start:

  • Codex Plug-In

  • Codex Application

This help file is organized in two parts: The Codex SDK, for the development of plug-ins, and also containing other low-level information about Codex; and the Codex API, which presents a very easy to use, RAD (rapid application development) layer for developing all-purpose data compression applications.

  • Codex SDK

  • Codex API

Once you build your own plug-ins and applications using Codex Plug-In Technology, you may have them certified for the Codex Plug-In Technology Logo.

  • Codex Plug-In Technology Logo

If you have previously developed solutions using Codex Plug-In Technology, you may want to check what's updated in this release:

  • What's New?

For more information:
http://www.mimarsinan.com
support@mimarsinan.com

Copyright© 1992-2003 MimarSinan International. All rights reserved.

Important - Please Read:
MimarSinan International has made every effort to ascertain the validity of the information contained herein, however may not be held liable for any misrepresentation of information. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of MimarSinan International. MimarSinan International may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from MimarSinan International, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property.


What's New?

MimarSinan Codex 2.2: What's New?

What's New in Version 2.2 of Codex Plug-In Technology

Codex Plug-In Technology is now accessible from a managed environment, featuring full support for the Microsoft .NET Platform via P/Invoke. The SDK samples have been updated to include .NET usage.

What's New in Version 2.1 of Codex Plug-In Technology

This update to Codex Plug-In Technology defines several new functions which Codex Plug-Ins must implement, along with new API functions that Codex Applications may use.

Please see the following topics for more information:

  • Plug-In Features Overview

  • Codex API Functions Reference


Codex Plug-Ins

MimarSinan Codex 2.2: Definitions

About Codex Plug-Ins

Codex Plug-Ins are collections of executables (DLLs, configuration files) which implement data compression and decompression functionality for the archive types they support. Each Codex Plug-In exposes its functionality in a way that is meaningful for Codex Applications, which rely on Codex Plug-Ins to compress and decompress data.

A Codex Plug-In can (de)compress files inside any archive that it supports. Codex Plug-Ins may support any number of archive formats, and also provide additional functionality, specific to each of the archive types they support.

The Codex Plug-In may be thought of as the actual data (de)compression engine that runs beneath every Codex Application. The end-user will be communicating with the plug-in through the Codex Application visual interface, and the plug-in will be processing all the actual data (de)compression requests received from the application.

See Also

Codex Application


Codex Applications

MimarSinan Codex 2.2: Definitions

About Codex Applications

Codex Applications are general purpose data compression applications which allow users to compress and decompress files, supporting a wide variety of archive types. Codex Applications rely on Codex Plug-Ins and the Codex Runtime for their data compression and decompression functionality.

A Codex Application (de)compresses archives in formats supported by the Codex Plug-Ins already installed on the system. Codex Plug-Ins may also provide additional functionality, specific to the archive types they support, which the Codex Applications can expose to their user.

The Codex Application may be thought of as the common interface that the end-user sees when interacting with all varieties of Codex Plug-Ins. Whereas the archives types supported and functionality offered by plug-ins vary greatly from plug-in to plug-in, the gateway to all that functionality is the application, presenting the end-user with a single unified environment for managing all sorts of different archive formats all at once.

See Also

Codex Plug-In


SDK Overview

MimarSinan Codex 2.2 SDK: Overview

About MimarSinan Codex Plug-In Technology 2.2 SDK

The Codex SDK contains the necessary information to build Codex Plug-In Technology compliant plug-ins and low-level applications.

The Codex SDK fully documents the required interfaces in a Codex plug-in. The Codex SDK, in providing this detailed information, also aids you in the authoring of low-level Codex applications which directly access installed Codex plug-ins without using the Codex API. For a RAD (rapid-application-development) approach to Codex application development, use the Codex AP I .

The following topics provide more information:

  • Development Environments: Supported programming languages

  • Plug-In DLL Functions: Required libraries and interfaces

  • Plug-In Profiles: Archiving settings for plug-in supported formats

  • Plug-In Registration: Publishing plug-in features with the Codex runtime

See Also

Codex API


Development Environments

MimarSinan Codex 2.2: Development Environments

Supported Development Environments

You may author Codex Plug-In Technology compliant Plug-Ins and Applications using a wide variety of programming languages.

Any development environment which can create Windows executables and call Windows DLLs may be used to create Codex Plug-In Technology compliant solutions. These include but are not limited to:

  • Microsoft Visual Studio .NET (managed and unmanaged)

  • Microsoft Visual Studio (previous versions)

  • Borland Delphi (all versions, including .NET)

  • Borland C# Builder (all versions)

  • Borland C++ Builder (all versions)

As long as your programming language has support for creating Windows executables and can call Windows DLLs, you may code in that language for creating Codex Plug-In Technology compliant applications. These include but are not limited to:

  • C, C++, C#, J#

  • Object Pascal

  • Visual Basic


Plug-In Features

MimarSinan Codex 2.1 SDK: Plug-In Features

Required Plug-In Features

The Plug-In DLL defines all the interfaces supported and entry-points published by the Codex Plug-In. In addition to the DLL, a number of auxiliary profile and directive files are used.

The Plug-In DLL exports a number of functions which provide archive services to Codex applications. These functions are enumerated below:

GetArchiveInfo
GetArchiveSizeEx
GetArchiveInfoEx
GetArchiveError
GetArchiveErrorEx
ShowPlugInAbout
CodexStandardFunction

The plug-in also needs to understand the formats of various directive files used by Codex and parse their contents:

Compression Directive File
Decompression Directive File
Custom Tool Directive File

Finally, the plug-in must ship with a collection of profile files for compression and decompression operations:

Plug-In Profile Files

See Also

Plug-In Registration


GetArchiveInfo

Codex SDK: Plug-In DLL Functions

GetArchiveInfo

The GetArchiveInfo function opens an archive and returns basic archive information. This is a plug-in defined function.

This function has been superceded by the GetArchiveSizeEx and GetArchiveInfoEx functions starting with Codex 2.1, however plug-ins may choose to continue implementing this function to retain compatibility with Codex 2.0 applications.

INT GetArchiveInfo(
    LPCTSTR lpFileName,  // name of file to open
    BOOL bSilent,        // silent operation flag
    LPTSTR lpItems,      // points to file names inside archive
    LPTSTR lpPwdItems,   // points to password protected file names inside archive
    LPTSTR lpDateTimes,  // points to dates and times of files inside archive
    LPTSTR lpSizes,      // points to sizes of files inside archive
    LPTSTR lpCompSizes   // points to compressed sizes of files inside archive
);

Parameters

lpFileName

[in] Pointer to a null-terminated string that specifies the full path of the archive to query.

bSilent

[in] Boolean value indicating whether to work in silent mode.

if bSilent is TRUE, you should not prompt the user with any information (such as errors) or requests (such as spanned media disk changes) that may be necessary. The plug-in must decide how to act on all such conditions.

if bSilent is FALSE, you may prompt the user for any and all needs.

pItems

[out] Pointer to the buffer that receives the names of all the files inside the archive.

lpPwdItems

[out] Pointer to the buffer that receives the names of all the password protected files inside the archive.

lpDateTimes

[out] Pointer to the buffer that receives the dates and times of all the files inside the archive.
The dates and times are already formatted as strings with textual date and time information.

lpSizes

[out] Pointer to the buffer that receives the original sizes of all the files inside the archive.
For archive types which cannot support this value, expect a return of 0 for each of the files inside the archive. An example to such archive types might be single-file compressors such as GZIP.

lpCompSizes

[out] Pointer to the buffer that receives the compressed sizes of all the files inside the archive.
For archive types which cannot support this value, expect a return of 0 for each of the files inside the archive. An example to such archive types might be solid compressors such as CAB.

Return Values

If the function succeeds, the return value is the count of items inside the archive.

If the function fails, the return value is -1. The user may call the GetArchiveError function to obtain error details, therefore GetArchiveInfo may need to set internal error level flags if an error occurred.

Remarks

The buffers filled in by this function are formatted as COMMATEXT to facilitate the representation of a collection of items in a single buffer.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

SDK Overview, Plug-In Features, GetArchiveError, COMMATEXT


GetArchiveSizeEx

Codex SDK: Plug-In DLL Functions

GetArchiveSizeEx

The GetArchiveSizeEx function opens an archive and prepares basic archive information. The prepared archive information will be further queried using the GetArchiveInfoEx function. This is a plug-in defined function.

INT GetArchiveSizeEx(
    LPCTSTR lpFileName,  // name of file to open
    BOOL bSilent,        // silent operation flag
    INT iItems,          // required buffer length for names of files inside archive
    INT iPwdItems,       // required buffer length for names of password protected files inside archive
    INT iDateTimes,      // required buffer length for dates and times of files inside archive
    INT iSizes,          // required buffer length for sizes of files inside archive
    INT iCompSizes       // required buffer length for compressed sizes of files inside archive
);

Parameters

lpFileName

[in] Pointer to a null-terminated string that specifies the full path of the archive to query.

bSilent

[in] Boolean value indicating whether to work in silent mode.

if bSilent is TRUE, you should not prompt the user with any information (such as errors) or requests (such as spanned media disk changes) that may be necessary. The plug-in must decide how to act on all such conditions.

if bSilent is FALSE, you may prompt the user for any and all needs.

iItems

[out] The required size of the buffer to hold the names of files inside the archive, excluding the null terminator.

iPwdItems

[out] The required size of the buffer to hold the names of password protected files inside the archive, excluding the null terminator.

iDateTimes

[out] The required size of the buffer to hold the dates and times of files inside the archive, excluding the null terminator.

iSizes

[out] The required size of the buffer to hold the sizes of files inside the archive, excluding the null terminator.

iCompSizes

[out] The required size of the buffer to hold the compressed sizes of files inside the archive, excluding the null terminator.

Return Values

If the function succeeds, the return value is the count of items inside the archive.

If the function fails, the return value is -1. The user may call the GetArchiveErrorEx function to obtain error details, therefore GetArchiveSizeEx may need to set internal error level flags if an error occurred.

Remarks

Applications will first call the GetArchiveSizeEx function to determine the length of the buffers they need to allocate to receive archive information. If the GetArchiveSizeEx function succeeds, applications will then call the GetArchiveInfoEx function to retrieve the actual archive information.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

SDK Overview, Plug-In Features, GetArchiveInfoEx, GetArchiveErrorEx, COMMATEXT


GetArchiveInfoEx

Codex SDK: Plug-In DLL Functions

GetArchiveInfoEx

The GetArchiveInfoEx function returns basic archive information. The GetArchiveSizeEx function will be called before this function is called. This is a plug-in defined function.

VOID GetArchiveInfoEx(
    LPTSTR lpItems,      // points to file names inside archive
    LPTSTR lpPwdItems,   // points to password protected file names inside archive
    LPTSTR lpDateTimes,  // points to dates and times of files inside archive
    LPTSTR lpSizes,      // points to sizes of files inside archive
    LPTSTR lpCompSizes   // points to compressed sizes of files inside archive
);

Parameters

lpItems

[out] Pointer to the buffer that receives the names of all the files inside the archive.

lpPwdItems

[out] Pointer to the buffer that receives the names of all the password protected files inside the archive.

lpDateTimes

[out] Pointer to the buffer that receives the dates and times of all the files inside the archive.
The dates and times are already formatted as strings with textual date and time information.

lpSizes

[out] Pointer to the buffer that receives the original sizes of all the files inside the archive.
For archive types which cannot support this value, expect a return of 0 for each of the files inside the archive. An example to such archive types might be single-file compressors such as GZIP.

lpCompSizes

[out] Pointer to the buffer that receives the compressed sizes of all the files inside the archive.
For archive types which cannot support this value, expect a return of 0 for each of the files inside the archive. An example to such archive types might be solid compressors such as CAB.

Return Values

This function does not return any values.

Remarks

The buffers filled in by this function are formatted as COMMATEXT to facilitate the representation of a collection of items in a single buffer.

Applications will first call the GetArchiveSizeEx function to determine the length of the buffers they need to allocate to receive archive information. If the GetArchiveSizeEx function succeeds, applications will then call the GetArchiveInfoEx function to retrieve the actual archive information.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

SDK Overview, Plug-In Features, GetArchiveSizeEx, GetArchiveErrorEx, COMMATEXT


GetArchiveError

Codex SDK: Plug-In DLL Functions

GetArchiveError

The GetArchiveError function describes the error that occurred during the last archive open operation. This is a plug-in defined function.

This function has been superceded by the GetArchiveErrorEx function starting with Codex 2.1, however plug-ins may choose to continue implementing this function to retain compatibility with Codex 2.0 applications.

VOID GetArchiveError(
    LPTSTR lpError    // points to error description
);

Parameters

lpError

[out] Pointer to the buffer that receives the textual description of the last archive open error that occurred.

Return Values

This function does not return any values.

Remarks

This function may only be called after the GetArchiveInfo function returns -1, indicating a failure.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

SDK Overview, Plug-In Features, GetArchiveInfo


GetArchiveErrorEx

Codex SDK: Plug-In DLL Functions

GetArchiveErrorEx

The GetArchiveErrorEx function describes the error that occurred during the last archive open operation. This is a plug-in defined function.

INT GetArchiveErrorEx(
    LPTSTR lpError      // points to error description
);

Parameters

lpError

[out] Pointer to the buffer that receives the textual description of the last archive open error that occurred.

Pass NULL in this parameter to request the required size for the buffer.

Return Values

The return value specifies the required size of the buffer, excluding the number of bytes necessary for a terminating null character.

Remarks

This function may only be called after the GetArchiveInfo or GetArchiveSizeEx function returns -1, indicating a failure.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

SDK Overview, Plug-In Features, GetArchiveSizeEx


ShowPlugInAbout (Plug-In DLL Function)

Codex SDK: Plug-In DLL Functions

ShowPlugInAbout

The ShowPlugInAbout function displays the plug-in defined about box. This is a plug-in defined function.

VOID ShowPlugInAbout(VOID);

Parameters

None.

Return Values

This function does not return any values.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

SDK Overview, Plug-In Features


CodexStandardFunction

Codex SDK: Plug-In DLL Functions

CodexStandardFunction

The CodexStandardFunction function performs a standard or plug-in defined archive function. This is a plug-in defined function.

VOID CodexStandardFunction(
    LPCTSTR lpFunction,      // standard or custom archive function description
    LPCTSTR lpParam1,        // first function parameter
    LPCTSTR lpParam2,        // second function parameter
);

Parameters

lpFunction

[in] Pointer to a null-terminated string that specifies the archive function to perform.

This parameter may be a standard archive function or a plug-in defined archive function.

Below is the list of standard Codex defined archive functions:

Function

Meaning

info

The plug-in is to extract information about the archive it supports. This parameter will never be passed to this function. If a plug-in publishes this function, the function will be used through the GetArchiveInfoEx function.

encode

(may be named differently by plug-in)

The plug-in is to compress a collection of files into an archive. Whether the archive already exists is not specified.

encodesetup

(may be named differently by plug-in)

The plug-in is to configure its compression settings through its custom compression profile editor.

decode

(may be named differently by plug-in)

The plug-in is to decompress a collection of files from an archive.

decodesetup

(may be named differently by plug-in)

The plug-in is to configure its decompression settings through its custom decompression profile editor.

If these standard functions have been named differently by the plug-in, the plug-in must be able to interpret them correctly upon being passed those values by the CodexStandardFunction. See verbs in Plug-In Registration for more information.

The plug-in may also publish a custom set of plug-in defined archive functions. If the plug-in has published a custom set of archive tools, the verbs for those tools may be passed as functions in the lpFunction parameter. See verbs in Plug-In Registration for more information.

lpParam1

[in] Pointer to a null-terminated string that specifies the first function parameter. This parameter has meaning that changes according to the value of the lpFunction parameter.

For standard Codex defined archive functions:

Function

Parameter 1 Meaning

info

Not used.

encode

Full path to the compression directive file.

encodesetup

Full path to the plug-in compression profile file.

decode

Full path to the decompression directive file.

decodesetup

Full path to the plug-in decompression profile file.

For custom plug-in defined archive functions, lpParam1 indicates the full path to the custom tool directive file.

lpParam2

[in] Pointer to a null-terminated string that specifies the second function parameter. This parameter has meaning that changes according to the value of the lpFunction parameter.

For standard Codex defined archive functions:

Function

Parameter 2 Meaning

info

Not used.

encode

Full path to the plug-in compression profile file.

encodesetup

Not used.

decode

Full path to the plug-in decompression profile file.

decodesetup

Not used.

For custom plug-in defined archive functions, lpParam2 is not used.

Return Values

This function does not return any values.

Remarks

The plug-in should perform the function indicated in the lpFunction parameter. During this process, the plug-in is wholly responsible for displaying all function progress indicators, handling all user interaction, and also possibly handling errors that may occur.

The plug-in must display a progress dialog box with information about the current status of the desired function.

The plug-in, for its custom defined archive functions, may display a custom dialog box to further interact with the user about the custom action. For instance, if the plug-in supports editing archive comments, the plug-on may display an "Edit Archive Comments" dialog box with an edit field to type the archive comments and an OK button to apply the comments to the archive.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

SDK Overview, Plug-In Features, Plug-In Registration, Compression Directive File, Decompression Directive File, Custom Tool Directive File


Compression Directive File

Codex SDK: Plug-In Directive Files

Compression Directive File

The Compression Directive File is a plain-text file that is created by the Codex runtime during archive compression operations. This directive file includes information about which files are to be compressed into which archive. A plug-in supporting compression needs to parse this directive file to obtain information about the compression operation desired.

destination archive file
files for recursive compression
$
files for non-recursive compression
$

Fields

destination archive file

The full path to the destination archive.

This is the first line of the directive file and is a mandatory field.

files for recursive compression

File masks, with full path information and possibly wildcards, indicating which files are to be recursively compressed into the archive. A single line must contain a single file mask. Multiple lines may be used.

This field is on the second and following lines of the directive file and is an optional field.

$

The character literal '$' (without the quotes). Indicates the list of files for recursive compression has ended.

This is a mandatory field. It can occur anywhere in the directive file starting from the second line, depending on how many lines were taken up by the files for recursive compression field.

files for non-recursive compression

File masks, with full path information and possibly wildcards, indicating which files are to be non-recursively compressed into the archive. A line must contain a single file mask. Multiple lines may be used.

This field may start as early as the third line and also take place on the following lines of the directive file. This is an optional field.

$

The character literal '$' (without the quotes). Indicates the list of files for non-recursive compression has ended. Also indicates the end of the directive file.

This is a mandatory field. It can occur anywhere in the directive file starting from the third line, depending on how many lines were taken up by the files for recursive compression and files for non-recursive compression fields, plus the character literal '$'.

Examples

If the compression directive file for a ZIP plug-in contains the following:

c:\backups\test
c:\my documents\presentation plan\*.*
c:\my documents\figures.doc
$
$

then, the ZIP plug-in should:

  1. Create or update a test.zip archive in the folder "c:\backups",

  2. Add the entire contents of the "c:\my documents\presentation plan" folder, with all files and subfolders to this archive,

  3. Add all instances of the file "figures.doc" found under the folder "c:\my documents" and all subfolders to this archive,

  4. Finish processing.

If the compression directive file for a GZIP plug-in contains the following:

c:\backups\test
$
c:\my documents\sales.doc
$

then, the GZIP plug-in should:

  1. Create a test.gzip archive in the folder "c:\backups",

  2. Add the file "sales.doc" found in the folder "c:\my documents" to this archive,

  3. Finish processing.

See Also

SDK Overview, Plug-In Features, Decompression Directive File, Custom Tool Directive File


Decompression Directive File

Codex SDK: Plug-In Directive Files

Decompression Directive File

The Decompression Directive File is a plain-text file that is created by the Codex runtime during archive decompression operations. This directive file includes information about which files are to be decompressed from which archive, and placed into which output location. A plug-in supporting decompression needs to parse this directive file to obtain information about the decompression operation desired.

source archive file
target output folder
files for extraction
$

Fields

source archive file

The full path to the source archive.

This is the first line of the directive file and is a mandatory field.

target output folder

The full path to the output folder for files decompressed from the source archive.

This field is on the second line of the directive file and is a mandatory field.

files for extraction

The list of files to be extracted from the archive. Each file to be decompressed will be on a separate line. Wildcards are NOT accepted. If the files are contained inside folders in the archive, the folder information for those archives will be specified exactly as returned from the archive contents listing of the GetArchiveInfoEx function.

This field starts on the third line and may also take place on the following lines of the directive file. This is an optional field.

$

The character literal '$' (without the quotes). Indicates the list of files for decompression has ended. Also indicates the end of the directive file.

This is a mandatory field. It can occur anywhere in the directive file starting from the third line, depending on how many lines were taken up by the files for extraction field.

Example

If the decompression directive file for a ZIP plug-in contains the following:

c:\backups\test.zip
c:\my documents\presentation plan
presentation.ppt
presentation.doc
graphics\sales figures.jpg
$

then, the ZIP plug-in should:

  1. Open the archive "test.zip" contained in the "c:\backups" folder,

  2. Extract the files "presentation.ppt" and "presentation.doc" to the "c:\my documents\presentation plan" folder,

  3. Extract the file "sales figures.jpg" found in the "graphics" folder of the "test.zip" archive to the "c:\my documents\presentation plan" folder,

  4. Finish processing.

See Also

SDK Overview, Plug-In Features, Compression Directive File, Custom Tool Directive File


Custom Tool Directive File

Codex SDK: Plug-In Directive Files

Custom Tool Directive File

The Custom Tool Directive File is a plain-text file that is created by the Codex runtime during plug-in defined archive tool operations. This directive file includes information about which files are to be processed by the custom tool (if applicable), and from which archive. A plug-in supporting custom archive tools needs to parse this directive file to obtain information about the tool operation desired.

source archive file
files for tool
$

Fields

source archive file

The full path to the source archive.

This is the first line of the directive file and is a mandatory field.

files for tool

The list of files in the archive to be processed by the custom tool. Each file to be processed will be on a separate line. Wildcards are NOT accepted. If the files are contained inside folders in the archive, the folder information for those archives will be specified exactly as returned from the archive contents listing of the GetArchiveInfoEx function.

If the custom tool operates on an entire archive and not files inside the archive (such as a Self Extracting Archive creation tool), files specified in this list may be ignored.

This field starts on the second line and may also take place on the following lines of the directive file. This is an optional field.

$

The character literal '$' (without the quotes). Indicates the list of files for the custom tool has ended. Also indicates the end of the directive file.

This is a mandatory field. It can occur anywhere in the directive file starting from the second line, depending on how many lines were taken up by the files for tool field.

Example

If the "Delete Files in Archive" custom tool directive file for a ZIP plug-in contains the following:

c:\backups\test.zip
c:\my documents\presentation plan
presentation.ppt
presentation.doc
graphics\sales figures.jpg
$

then, the ZIP plug-in should:

  1. Open the archive "test.zip" contained in the "c:\backups" folder,

  2. Delete the files "presentation.ppt" and "presentation.doc" in the archive,

  3. Delete the file "sales figures.jpg" found in the "graphics" folder of the "test.zip" archive,

  4. Finish processing.

See Also

SDK Overview, Plug-In Features, Compression Directive File, Decompression Directive File


Plug-In Profile Files

Codex SDK: Plug-In Profile Files

Compression / Decompression Profile Files

Compression / Decompression Profile Files are used to store archive type specific and plug-in specific compression/decompression settings. The storage of multiple compression/decompression settings in separate configuration files allows the choosing of the appropriate profiles when different settings need to be used for different tasks.

These compression/decompression settings are stored as files in the file system. Their location is determined during Plug-In Registration. The plug-in may ship with separate profiles for each of the archive types it supports. The format of the profile file and its contents are the sole responsibility of the plug-in. However, the plug-in must provide tools that enable a user to visually configure the settings stored within the profile file.

There are two kinds of profile files. Compression Profiles, and Decompression Profiles.

Compression Profiles

Compression profiles are identified by their file names. Each Codex compression profile has the file extension ".meprf" (without the quotes).

A plug-in which supports compression must include a standard set of Codex defined profiles. These are used by the Codex runtime automatically when certain types of compression operations occur. They are identified by their file names.

If a plug-in does not support compression, it should not include any compression profiles. If it partially supports compression, it should only include profiles that are associated with operations it can support.

The following table describes the standard set of Codex defined compression profiles, when they are used, and which compression settings they must enable.

Name

Meaning

Default.meprf

Must exist only if the plug-in supports compression.

The compression thread must execute with Normal priority.

The compression strength must be at maximum.

Relative or absolute folder information must be preserved for files added to archives.

This is the default profile. Applications are recommended to use this profile for all standard compression tasks.

Structured.meprf

Must exist only if the plug-in supports compression.

The compression thread must execute with Normal priority.

The compression strength must be at maximum.

Relative folder information must be preserved for files added to archives.

This is an internal Codex profile. This profile is used during the execution of Codex defined archive tools, such as archive type conversion, viewing/updating files inside archives, installing archives, and so on.

Shell.meprf

Must exist only if the plug-in supports compression.

The compression thread must execute with Lower priority.

The compression strength must be at maximum.

Relative folder information must be preserved for files added to archives.

This is the shell profile. This profile is used during shell operations. For example, when the user right-clicks an archive in Windows Explorer and selects an archive action, the shell profile is used.

A plug-in may also ship with other compression profiles. Furthermore, users may create their own compression profiles, such as "Fastest Compression" and "Maximum Compression", to assist them in storing their frequently used compression settings.

Decompression Profiles

Decompression profiles are identified by their file names. Each Codex decompression profile has the file extension ".mdprf" (without the quotes).

A plug-in which supports decompression must include a standard set of Codex defined profiles. These are used by the Codex runtime automatically when certain types of decompression operations occur. They are identified by their file names.

If a plug-in does not support decompression, it should not include any decompression profiles. If it partially supports decompression, it should only include profiles that are associated with operations it can support.

The following table describes the standard set of Codex defined decompression profiles, when they are used, and which decompression settings they must enable.

Name

Meaning

Default.mdprf

Must exist only if the plug-in supports decompression.

The decompression thread must execute with Normal priority.

Decompressed files must be placed directly in the output folder.

Files that are in subfolders of the archive must be decompressed into corresponding subfolders of the output folder.

If files need to be overwritten during extraction, the user must always be asked first.

This is the default profile. Applications are recommended to use this profile for all standard decompression tasks.

Structured.mdprf

Must exist only if the plug-in supports decompression.

The decompression thread must execute with Normal priority.

Decompressed files must be placed directly in the output folder.

Files that are in subfolders of the archive must be decompressed into corresponding subfolders of the output folder.

If files need to be overwritten during extraction, they must always be directly overwritten.

This is an internal Codex profile. This profile is used during the execution of Codex defined archive tools, such as archive type conversion, viewing/updating files inside archives, installing archives, and so on.

Shell.mdprf

Must exist only if the plug-in supports decompression.

The decompression thread must execute with Lower priority.

Decompressed files must be placed in a subfolder of the output folder. This subfolder must bear the archive name, without the extension.

Files that are in subfolders of the archive must be decompressed into corresponding subfolders of the output folder.

If files need to be overwritten during extraction, the user must always be asked first.

This is the shell profile. This profile is used during shell operations. For example, when the user right-clicks an archive in Windows Explorer and selects an archive action, the shell profile is used.

A plug-in may also ship with other decompression profiles. Furthermore, users may create their own decompression profiles, such as "Extract Files Without Paths," to assist them in storing their frequently used decompression settings.

See Also

SDK Overview, Plug-In Features, Plug-In Registration, CodexStandardFunction


Registration Overview

MimarSinan Codex 2.2 SDK: Plug-In Registration

Plug-In Registration

The Plug-In must register with the Codex runtime and publish all the features it supports. Codex applications will be able to use the plug-in only if the Plug-In registers with the Codex runtime.

Plug-ins need to create keys in the system registry to register themselves with the Codex runtime. The registry keys created indicate which archive types the plug-in supports, and the level of support provided for each - including standard and custom archive operations.

Each archive operation that is featured by the plug-in is assigned a verb by the plug-in. The verb may be any string value that uniquely identifies to the plug-in the operation to be performed. Verbs for similar operations across different archive types may need to be different, depending on the plug-in implementation. For instance, the compression verb for ZIP archives handled by the plug-in may be "compresszip" (without the quotes), whereas the compression verb for CAB archives handled by the plug-in may be "compresscab" (without the quotes).

The necessary registry keys and verbs are described below.

HKEY_LOCAL_MACHINE
SOFTWARE
 MimarSinan
    Codex
       2.0
          Plug-Ins
             [Plug-In Name]=''
                [Archive Type Mask]=''
                   DLL='[DLL Path for Archive Type]'
                   Folder='[Plug-In Folder for Archive Type Profiles]'
                   Verbs=''
                      [encode]='[archive compression verb]'
                      [encodesetup]='[compression profile editor verb]'
                      [decode]='[archive decompression verb]'
                      [decodesetup]='[decompression profile editor verb]'
                      [info]=''
                      [custom tool verb]='[tool name]$[tool hint]'

Keys and Values

Plug-In Name (Key)

The name of the plug-in. The plug-in will be known under this name by the Codex runtime.

This key is mandatory.

Archive Type Mask (Key)

File mask for an archive this plug-in supports. The file mask may include wildcards and must not only be a file extension. For instance, use "*.ZIP" (without the quotes) if the plug-in supports ZIP archives.

The plug-in may specify as many Archive Type Masks as needed. The details of each key must be created as necessary.

This key is optional. However, a plug-in without this key will not be publishing any features for any archives.

DLL Path for Archive Type (String Value)

The full path to the plug-in provided DLL that handles archives of the type specified in Archive Type Mask. The plug-in may use the same DLL for each archive type, or specify different DLLs for each archive type.

This value is mandatory for the Archive Type Mask key it has been created under.

Plug-In Folder for Archive Type Profiles (String Value)

The full path to the folder where profiles for this archive type can be found. The plug-in may maintain separate folders for profiles used with different archive types, or keep all profiles in a single folder.

This value is mandatory for the Archive Type Mask key it has been created under.

info (String Value Name)

This value name, if present, indicates the plug-in can obtain information about the archive type indicated in the Archive Type Mask key. This information would be obtained from the plug-in using the GetArchiveInfo function.

This value name is optional.

encode (String Value Name)

This value name, if present, indicates the plug-in can perform compression for the archive type indicated in the Archive Type Mask key.

This value name is optional.

archive compression verb (String Value)

The verb indicated here is passed by the CodexStandardFunction function to the plug-in to start a compression operation.

Typically, this verb is called "encode" (without the quotes).

This value is mandatory if the encode value name has been created.

encodesetup (String Value Name)

This value name, if present, indicates the plug-in can perform compression profile editing for the archive type indicated in the Archive Type Mask key.

This value is mandatory if the encode value name has been created.

compression profile editor verb (String Value)

The verb indicated here is passed by the CodexStandardFunction function to the plug-in to edit a compression profile.

Typically, this verb is called "encodesetup" (without the quotes).

This value is mandatory if the encode value name has been created.

decode (String Value Name)

This value name, if present, indicates the plug-in can perform decompression for the archive type indicated in the Archive Type Mask key.

This value name is optional.

archive decompression verb (String Value)

The verb indicated here is passed by the CodexStandardFunction function to the plug-in to start a decompression operation.

Typically, this verb is called "decode" (without the quotes).

This value is mandatory if the decode value name has been created.

decodesetup (String Value Name)

This value name, if present, indicates the plug-in can perform decompression profile editing for the archive type indicated in the Archive Type Mask key.

This value is mandatory if the decode value name has been created.

decompression profile editor verb (String Value)

The verb indicated here is passed by the CodexStandardFunction function to the plug-in to edit a decompression profile.

Typically, this verb is called "decodesetup" (without the quotes).

This value is mandatory if the decode value name has been created.

custom tool verb (String Value Name)

This value name, if present, defines a custom tool verb. The verb indicated here is passed by the CodexStandardFunction function to the plug-in to start a plug-in defined archive operation (custom archive tool).

The plug-in may specify as many custom tool verbs as it supports. However, the values for each of these must be initialized properly.

This value name is optional.

tool name $ tool hint (String Value)

This value provides the textual description of the tool indicated by the custom tool verb. Seperated by a "$" (without the quotes), it also provides the menu item hint for this tool - a brief tool description.

For instance, if the custom tool verb to create self extracting CAB archives has been defined as SEA-CAB by the plug-in, the tool name $ tool hint value may be "Self Extracing Cabinet Maker$Converts your cabinet archive to a self extracting executable" (without the quotes).

This value is mandatory if the custom tool verb value name has been created.

After the registry keys have been created, the plug-in must "bind" itself with the archive types that it supports. Creating registry keys publishes plug-in functionality, binding activates that functionality. Binding is the process wherein the plug-in becomes literally the handler of certain archive types. Whenever an archive function is requested, those requests will be mapped to the plug-in "bound" to those features of the archive.

To bind itself to an archive type it supports (an archive type for which it has already created a registry key for), the plug-in should call the BindPlugIn function of the Codex API.

Plug-In Un-Registration

When the plug-in will no longer be used (such as during plug-in uninstallation), the plug-in must do the following in the order they are presented to un-register itself from the Codex runtime:

  1. Call the UnBindPlugIn function of the Codex API.

  2. Delete all registry keys it created.

See Also

Plug-In Features


API Overview

MimarSinan Codex 2.2 API: Overview

About MimarSinan Codex Plug-In Technology 2.2 API

The Codex API is a collection of runtime components (executables and configuration files) intended to make the task of developing Codex Plug-In Technology compliant products very simple.

The Codex API dramatically simplifies the development of Codex Applications, by providing a collection of functions which make it very easy to communicate with and use Codex Plug-Ins already installed on the system. The Codex API also provides helper functions which may be used during Codex Plug-In development.

The following topics provide more information:

  • Codex Runtime Installation: Required components for MimarSinan Codex

  • Development Environments: Supported programming languages

  • Codex Function Reference: For developing Codex Clients using the Codex API

Please keep in mind that the Codex API is not required to develop Codex Plug-In Technology compliant products. The Codex API is provided only as a RAD (rapid-application-development) tool to aid in the development and installation of Codex products. The Codex SDK portion of this documentation outlines all the necessary information that can be used to build Codex Plug-Ins and Codex Applications from scratch.

See Also

Codex SDK


Installation

MimarSinan Codex 2.2 API: Installation

Codex Runtime Installation

For successful operation of Codex plug-ins and applications, the Codex runtime is required on the target system. The Codex runtime is comprised of the following files:

  • mCodexDLLStub.exe: Process launcher stub. Used internally by Codex.

  • mCodexAPI.dll: The core Codex API DLL. Exports all the Codex runtime functions used by applications and possibly by plug-ins.

  • mControlPanel.cpl: Control Panel applets DLL. This DLL provides three Control Panel applets for configuring various aspects of the Codex Runtime as well as plug-ins.

  • mScan.msi: Anti-Virus scanner configuration file. This configuration file is shared by all Codex applications. When an anti-virus scan request is received by the Codex runtime, information on which external anti-virus software to use is contained in this file. The anti-virus scanner is then executed with the appropriate command line parameters for automated scanning.

  • codex.translations.Active: Codex API messages file. Contains all strings used by Codex in the installed language.

These files must be located in the System (for Windows 9X operating systems, including Windows ME) or System32 (for Windows NT operating systems, including Windows 2000 and Windows XP) directory of the target system. No DLL registration is required.

When installing these files, overwrite existing copies only if the files included in your distribution have a newer version. Overwriting a newer version of the runtime with an older version may cause catastrophic system failures.

The following are the platform requirements of the Codex runtime:

  • Windows NT/2000/XP: Windows NT 4.0 SP4 or later.

  • Windows 95/98/Me: Windows 98 (or Windows 95 with DCOM 1.2).

The Codex runtime can also be accessed from the Microsoft .NET Platform running on Win32 systems via P/Invoke. Look in the SDK folder of your installation to find examples of such usage. Of course, the Codex runtime must already be properly installed on the system where the Platform Invocation is meant to occur.


API Functions

MimarSinan Codex 2.2 API: Functions Reference

Installation Functions

The following functions assist installation of plug-ins.

BindPlugIn
UnBindPlugIn

Archive Functions

The following functions are used with archives.

GetCompressibleArchives
GetCompressibleArchivesEx
GetExtractableAchives
GetExtractableArchivesEx
GetSupportedArchives
GetSupportedArchivesEx
QueryArchive
QueryArchiveFieldLength
QueryArchiveEx
CreateMergedArchive
CreateSingularArchives
ExtractArchive
InstallArchive
CheckOutArchive
ConvertArchive
ViewUpdateArchive
GetArchiveTools
GetArchiveToolsEx
GetArchiveToolHints
GetArchiveToolHintsEx
RunArchiveTool

Archive Profile Functions

The following functions are used with archive profiles.

GetCompressionProfiles
GetCompressionProfilesEx
GetExtractionProfiles
GetExtractionProfilesEx
EditCompressionProfile
EditExtractionProfile
DeleteCompressionProfile
DeleteExtractionProfile

Plug-In Functions

The following functions are used with Codex plug-ins.

LoadPlugIns
FreePlugIns
GetPlugIns
GetPlugInsEx
ShowPlugInAbout
GetArchives
GetArchivesEx
GetArchivesByPlugIn
GetArchivesByPlugInEx
GetArchiveFunctionsByPlugIn
GetArchiveFunctionsByPlugInEx

Common Dialog Box Functions

The following functions provide Codex common dialog boxes.

StartSplash
EndSplash
CodexAbout
EditCodexAssociations
EditPlugInBindings

Shell Functions

The following functions provide shell services for Codex applications.

CheckCodexAssociations
ForceCodexAssociations
GetGenericViewer
GetGenericViewerEx
SetGenericViewer
RegisterCodexApplication
EraseWorkingFiles

Types

The following are types used by Codex functions.

COMMATEXT


BindPlugIn

Codex API: Installation

BindPlugIn

The BindPlugIn function registers a plug-in for use with an archive type it supports. This function is primarily intended to be used during plug-in installation. It should be used during the registration of the plug-in with the Codex runtime, after all plug-in files have been successfully installed.

VOID BindPlugIn(
    LPCTSTR lpName,    // name of plug-in
    LPCTSTR lpArchive  // archive format
);

Parameters

lpName

[in] Pointer to a null-terminated string that specifies the name of the plug-in being registered for the archive type. This must be the same name that the plug-in registered with under the Codex runtime.

lpArchive

[in] Pointer to a null-terminated string that specifies the archive format for which the plug-in is being registered as a handler.

This name must be in wildcard form, indicating the expected file names of supported archives. For example, if you are registering a CAB plug-in, specify "*.CAB" (without the quotes). If you are registering a SZDD plug-in (for archives created using Microsoft's COMPRESS.EXE), specify "*.??_". Having a wildcard in this parameter assures archives which do not have a fixed file extension are still handled by the plug-in.

Return Values

This function does not return any values.

Remarks

The BindPlugIn function is a request. It does not guarantee that the plug-in will be associated with all possible functions of the given archive. In effect, this function:

  1. Checks to see if other plug-ins have previously registered themselves with any functions of the given archive.

  2. If previous registrations exist, the requesting plug-in owns only the non-registered archive functions, if any remain.

  3. If no previous registrations exist, the requesting plug-in owns all the archive functions it supports on the archive.

The user may further customize the mapping of functions between archives and plug-ins. See the EditPlugInBindings function for more information.

Note that during plug-in uninstallation, for each BindPlugIn call, a corresponding UnBindPlugIn call is required.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, UnBindPlugIn, EditPlugInBindings


UnBindPlugIn

Codex API: Installation

UnBindPlugIn

The UnBindPlugIn function un-registers a plug-in from use with an archive type it supports. This function is primarily intended to be used during plug-in uninstallation. It should be used before any plug-in files are removed from the system.

VOID BindPlugIn(
    LPCTSTR lpName,    // name of plug-in
    LPCTSTR lpArchive  // archive format
);

Parameters

lpName

[in] Pointer to a null-terminated string that specifies the name of the plug-in being un-registered for the archive type. This must be the same name that the plug-in previously registered with under the Codex runtime.

lpArchive

[in] Pointer to a null-terminated string that specifies the archive format for which the plug-in is being un-registered as a handler. This must be the same value as used during plug-in registration. See the BindPlugIn function for more information.

Return Values

This function does not return any values.

Remarks

UnBindPlugIn does not automatically re-associate the selected archive with other plug-ins present on the system which have support for the archive. Therefore, some or all archive functions may be disabled after UnBindPlugIn returns.

The user may manually edit the mapping of functions between archives and plug-ins. See the EditPlugInBindings function for more information.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, BindPlugIn, EditPlugInBindings


GetCompressibleArchives

Codex API: Archives

GetCompressibleArchives

The GetCompressibleArchives function obtains information on which archive types are supported for compression operations.

Note This function is provided for backwards compatibility only. Newer applications should use the GetCompressibleArchivesEx function.

LPCTSTR GetCompressibleArchives(VOID);

Parameters

This function has no parameters.

Return Values

This function returns the list of all supported archive types formatted as COMMATEXT. Each archive type is identified by its extension. The extension is typically three characters long and may contain file masks.

Remarks

Whether existing archives of a given type may be updated or only created from scratch is not specified.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetExtractableArchives, GetSupportedArchives


GetCompressibleArchivesEx

Codex API: Archives

GetCompressibleArchivesEx

The GetCompressibleArchivesEx function obtains information on which archive types are supported for compression operations.

INT GetCompressibleArchivesEx(
    LPTSTR lpCompressibleArchives  // points to compressible archive types
);

Parameters

lpCompressibleArchives

[out] Pointer to the buffer that receives the archive types supported for compression. The buffer is formatted as COMMATEXT. Each archive type is identified by its extension. The extension is typically three characters long and may contain file masks.

Pass NULL in this parameter to request the required size for the buffer.

Return Values

The return value specifies the required size of the buffer, excluding the number of bytes necessary for a terminating null character.

Remarks

Whether existing archives of a given type may be updated or only created from scratch is not specified.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetExtractableArchivesEx, GetSupportedArchivesEx


GetExtractableArchives

Codex API: Archives

GetExtractableArchives

The GetExtractableArchives function obtains information on which archive types are supported for decompression operations.

Note This function is provided for backwards compatibility only. Newer applications should use the GetExtractableArchivesEx function.

LPCTSTR GetExtractableArchives(VOID);

Parameters

This function has no parameters.

Return Values

This function returns the list of all supported archive types formatted as COMMATEXT. Each archive type is identified by its extension. The extension is typically three characters long and may contain file masks.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetCompressibleArchives, GetSupportedArchives


GetExtractableArchivesEx

Codex API: Archives

GetExtractableArchivesEx

The GetExtractableArchivesEx function obtains information on which archive types are supported for decompression operations.

INT GetExtractableArchivesEx(
    LPTSTR lpExtractableArchives  // points to extractable archive types
);

Parameters

lpExtractableArchives

[out] Pointer to the buffer that receives the archive types supported for extraction. The buffer is formatted as COMMATEXT. Each archive type is identified by its extension. The extension is typically three characters long and may contain file masks.

Pass NULL in this parameter to request the required size for the buffer.

Return Values

The return value specifies the required size of the buffer, excluding the number of bytes necessary for a terminating null character.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetCompressibleArchivesEx, GetSupportedArchivesEx


GetSupportedArchives

Codex API: Archives

GetSupportedArchives

The GetSupportedArchives function obtains information on which archive types are supported for compression and/or decompression operations.

Note This function is provided for backwards compatibility only. Newer applications should use the GetSupportedArchivesEx function.

LPCTSTR GetSupportedArchives(VOID);

Parameters

This function has no parameters.

Return Values

This function returns the list of all supported archive types formatted as COMMATEXT. Each archive type is identified by its extension. The extension is typically three characters long and may contain file masks.

Remarks

For each of the returned archive types, compression support, decompression support, or both may be available.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetCompressibleArchives, GetExtractableArchives


GetSupportedArchivesEx

Codex API: Archives

GetSupportedArchivesEx

The GetSupportedArchivesEx function obtains information on which archive types are supported for compression and/or decompression operations.

INT GetSupportedArchivesEx(
    LPTSTR lpSupportedArchives  // points to supported archive types
);

Parameters

lpSupportedArchives

[out] Pointer to the buffer that receives the archive types supported for compression and/or extraction. The buffer is formatted as COMMATEXT. Each archive type is identified by its extension. The extension is typically three characters long and may contain file masks.

Pass NULL in this parameter to request the required size for the buffer.

Return Values

The return value specifies the required size of the buffer, excluding the number of bytes necessary for a terminating null character.

Remarks

For each of the returned archive types, compression support, decompression support, or both may be available.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetCompressibleArchivesEx, GetExtractableArchivesEx


QueryArchive

Codex API: Archives

QueryArchive

The QueryArchive function opens an archive and returns basic archive information.

Note This function is provided for backwards compatibility only. Newer applications should use the QueryArchiveFieldLength and QueryArchiveEx functions.

LPCTSTR QueryArchive(
    LPCTSTR lpFileName,  // name of file to open
    LPTSTR lpItems,      // points to file names inside archive
    LPTSTR lpPwdItems,   // points to password protected file names inside archive
    LPTSTR lpDateTimes,  // points to dates and times of files inside archive
    LPTSTR lpSizes,      // points to sizes of files inside archive
    LPTSTR lpCompSizes   // points to compressed sizes of files inside archive
);

Parameters

lpFileName

[in] Pointer to a null-terminated string that specifies the full path of the archive to query.

lpItems

[out] Pointer to the buffer that receives the names of all the files inside the archive.

lpPwdItems

[out] Pointer to the buffer that receives the names of all the password protected files inside the archive.

lpDateTimes

[out] Pointer to the buffer that receives the dates and times of all the files inside the archive.
The dates and times are already formatted as strings with textual date and time information.

lpSizes

[out] Pointer to the buffer that receives the original sizes of all the files inside the archive.
For archive types which cannot support this value, expect a return of 0 for each of the files inside the archive. An example to such archive types might be single-file compressors such as GZIP.

lpCompSizes

[out] Pointer to the buffer that receives the compressed sizes of all the files inside the archive.
For archive types which cannot support this value, expect a return of 0 for each of the files inside the archive. An example to such archive types might be solid compressors such as CAB.

Return Values

If the function succeeds, the return value is an empty string.

If the function fails, the returned string contains a textual description of the error that occurred while querying the archive. This error is returned by the plug-in handling the archive.

Remarks

The buffers filled in by this function are formatted as COMMATEXT to facilitate the representation of a collection of items in a single buffer.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, LoadPlugIns, COMMATEXT


QueryArchiveFieldLength

Codex API: Archives

QueryArchiveFieldLength

The QueryArchiveFieldLength function opens an archive and prepares basic archive information. The QueryArchiveEx function is typically called after this function.

INT QueryArchiveFieldLength(
    LPCTSTR lpFileName,       // name of file to open
    INT iItems,               // required buffer length for file names inside archive
    INT iPwdItems,            // required buffer length for password protected file names inside archive
    INT iDateTimes,           // required buffer length for dates and times of files inside archive
    INT iSizes,               // required buffer length for sizes of files inside archive
    INT iCompSizes            // required buffer length for compressed sizes of files inside archive
);

Parameters

lpFileName

[in] Pointer to a null-terminated string that specifies the full path of the archive to query.

iItems

[out] The required size of the buffer to hold the names of files inside the archive, excluding the null terminator.

iPwdItems

[out] The required size of the buffer to hold the names of password protected files inside the archive, excluding the null terminator.

iDateTimes

[out] The required size of the buffer to hold the dates and times of files inside the archive, excluding the null terminator.

iSizes

[out] The required size of the buffer to hold the sizes of files inside the archive, excluding the null terminator.

iCompSizes

[out] The required size of the buffer to hold the compressed sizes of files inside the archive, excluding the null terminator.

Return Values

If the function succeeds, the return value is 0.

If the function fails, the return value is the required size of the buffer to hold the textual description of the error that occurred while querying the archive. This error is returned by the plug-in handling the archive.

Remarks

Call the QueryArchiveFieldLength function first to obtain the sizes of the buffers you need to allocate. If QueryArchiveFieldLength succeeds, then call the QueryArchiveEx function to obtain the actual archive information into the buffers you have allocated.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, LoadPlugIns, QueryArchiveEx, COMMATEXT


QueryArchiveEx

Codex API: Archives

QueryArchiveEx

The QueryArchiveEx function returns basic archive information. The QueryArchiveFieldLength function must be called before this function.

VOID QueryArchiveEx(
    LPTSTR lpItems,      // points to file names inside archive
    LPTSTR lpPwdItems,   // points to password protected file names inside archive
    LPTSTR lpDateTimes,  // points to dates and times of files inside archive
    LPTSTR lpSizes,      // points to sizes of files inside archive
    LPTSTR lpCompSizes,  // points to compressed sizes of files inside archive
    LPTSTR lpError       // points to archive query error
);

Parameters

lpItems

[out] Pointer to the buffer that receives the names of all the files inside the archive.

You may pass NULL in this parameter if this field is not required.

lpPwdItems

[out] Pointer to the buffer that receives the names of all the password protected files inside the archive.

You may pass NULL in this parameter if this field is not required.

lpDateTimes

[out] Pointer to the buffer that receives the dates and times of all the files inside the archive.
The dates and times are already formatted as strings with textual date and time information.

You may pass NULL in this parameter if this field is not required.

lpSizes

[out] Pointer to the buffer that receives the original sizes of all the files inside the archive.
For archive types which cannot support this value, expect a return of 0 for each of the files inside the archive. An example to such archive types might be single-file compressors such as GZIP.

You may pass NULL in this parameter if this field is not required.

lpCompSizes

[out] Pointer to the buffer that receives the compressed sizes of all the files inside the archive.
For archive types which cannot support this value, expect a return of 0 for each of the files inside the archive. An example to such archive types might be solid compressors such as CAB.

You may pass NULL in this parameter if this field is not required.

lpError

[out] Pointer to the buffer that receives a textual description of the error which occurred while attempting to obtain information about the files contained inside the archive. This error is returned by the plug-in handling the archive.

You may pass NULL in this parameter if this field is not required.

Return Values

This function does not return any values.

Remarks

The buffers filled in by this function are formatted as COMMATEXT to facilitate the representation of a collection of items in a single buffer.

Call the QueryArchiveFieldLength function first to obtain the sizes of the buffers you need to allocate. If QueryArchiveFieldLength succeeds, then call the QueryArchiveEx function to obtain the actual archive information into the buffers you have allocated.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, LoadPlugIns, QueryArchiveFieldLength, COMMATEXT


CreateMergedArchive

Codex API: Archives

CreateMergedArchive

The CreateMerged Archive function creates or updates an archive.

VOID CreateMergedArchive(
    LPCTSTR lpArchive,    // archive to create
    LPCTSTR lpRecurse,    // files to recursively compress
    LPCTSTR lpNormal,     // files to compress
    LPCTSTR lpProfile     // compression profile to use
);

Parameters

lpArchive

[in] Pointer to a null-terminated string that specifies the full path of the archive to create or update. The archive must contain a valid archive extension that is supported for compression. Use the GetCompressibleArchivesEx function to obtain a list of archives supported for compression.

If the archive does not already exist, it will be created.
If the archive already exists, it will be updated only if the plug-in supports updating of existing archives.

lpRecurse

[in] Pointer to a null-terminated string formatted as COMMATEXT specifying the list of files to compress recursively. UNC paths are accepted. Wildcards are accepted.

Folders will be compressed with all their files and subfolders. Files will be compressed with all matching files in subfolders as well.

To preserve folder information in your archives, make sure you specify only the top level folder of the tree you wish to compress. The archive type also must support folder information storage and the profile must allow folder storage.

Pass NULL in this parameter to indicate no files will be recursively compressed.

lpNormal

[in] Pointer to a null-terminated string formatted as COMMATEXT specifying the list of files to compress non-recursively. UNC paths are accepted. Wildcards are accepted.

Folders will be compressed with all files they contain.

Pass NULL in this parameter to indicate no files will be normally compressed.

lpProfile

[in] Pointer to a null-terminated string specifying the compression profile to use. Use the GetCompressionProfilesEx function to obtain a list of available profiles by each archive type.

The indicated profile must exist.

It is recommended that you only use the "Default" profile, which is guaranteed to exist if the archive is compressible.

Return Values

This function does not return any values.

Remarks

CreateMergedArchive invokes the compression plug-in mapped to the given archive type. The plug-in is responsible for displaying progress and feedback to the user. The plug-in must also handle error conditions. CreateMergedArchive returns once the invoked plug-in completes processing.

CreateMergedArchive combines all files specified in the lpRecurse and lpNormal parameters into a single output archive. There are some archive types for which this might not be suitable, such as GZIP or BZIP2 archives which cannot contain more than a single file inside an archive. Use the CreateSingularArchives function to handle such archive types.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetCompressibleArchivesEx, GetCompressionProfilesEx, CreateSingularArchives, ExtractArchive , COMMATEXT


CreateSingularArchives

Codex API: Archives

CreateSingularArchives

The CreateSingular Archives function creates archives which are allowed to contain a single compressed file.

This function is designed to compress multiple files into multiple output archives.

VOID CreateSingularArchives(
    LPCTSTR lpArchiveType,    // archive type to create
    LPCTSTR lpPath,           // output path
    LPCTSTR lpFiles,          // files to compress
    LPCTSTR lpProfile         // compression profile to use
);

Parameters

lpArchiveType

[in] Pointer to a null-terminated string that specifies the type of archive to create.

The lpArchive parameter must include the archive extension only. The extension may include wildcards.

Use the GetCompressibleArchivesEx function to obtain a list of archive types supported for compression.

lpPath

[in] Pointer to a null-terminated string specifying the output path for the new archives. UNC paths are accepted.

Pass NULL in this parameter to indicate that new archives must be created in the same folder(s) as the files being archived. This is useful when archiving files in different folders and when the output must fall in the same respective folders.

lpFiles

[in] Pointer to a null-terminated string formatted as COMMATEXT specifying the list of files to compress non-recursively. UNC paths are accepted.

Wildcards are NOT accepted.

lpProfile

[in] Pointer to a null-terminated string specifying the compression profile to use. Use the GetCompressionProfilesEx function to obtain a list of available profiles by each archive type.

The indicated profile must exist.

It is recommended that you only use the "Default" profile, which is guaranteed to exist if the archive is compressible.

Return Values

This function does not return any values.

Remarks

CreateSingularArchives invokes the compression plug-in mapped to the given archive type, starting with the first file in the lpFiles parameter. Once the first archive has been created, CreateSingularArchives invokes the plug-in again, until all source files specified in the lpFiles parameter have been exhausted.

The plug-in is responsible for displaying progress and feedback to the user during this entire process. The plug-in must also handle error conditions.

CreateSingularArchives is most suitable for archive types such as GZIP or BZIP2, which allow only a single file to be present inside an archive. To compress multiple files into a single archive, use the CreateMergedArchive function instead.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetCompressibleArchivesEx, GetCompressionProfilesEx, CreateMergedArchives, ExtractArchive , COMMATEXT


ExtractArchive

Codex API: Archives

ExtractArchive

The Extract Archive function extracts compressed files inside an archive.

VOID ExtractArchive(
    LPCTSTR lpArchive,  // archive to extract
    LPCTSTR lpPath,     // output folder
    LPCTSTR lpFiles,    // files in archive to extract
    LPCTSTR lpProfile   // extraction profile to use
);

Parameters

lpArchive

[in] Pointer to a null-terminated string that specifies the full path of the archive to extract from.

The archive must be supported for decompression. Use the GetExtractableArchivesEx function to obtain a list of archives supported for decompression.

lpPath

[in] Pointer to a null-terminated string specifying the output folder for the extracted files. UNC paths are accepted.

lpFiles

[in] Pointer to a null-terminated string formatted as COMMATEXT specifying the list of files inside the archive to be extracted. If the files inside the archive contain path information, lpFiles must also contain corresponding path information.

Wildcards are NOT accepted.

lpProfile

[in] Pointer to a null-terminated string specifying the decompression profile to use. Use the GetExtractionProfilesEx function to obtain a list of available profiles by each archive type.

The indicated profile must exist.

It is recommended that you only use the "Default" profile, which is guaranteed to exist if the archive is decompressible.

Return Values

This function does not return any values.

Remarks

ExtractArchive invokes the decompression plug-in mapped to the given archive type. The plug-in is responsible for displaying progress and feedback to the user. The plug-in must also handle error conditions. ExtractArchive returns once the invoked plug-in completes processing.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetExtractableArchivesEx, GetExtractionProfilesEx, CreateMergedArchive, COMMATEXT


InstallArchive

Codex API: Archives

InstallArchive

The Install Archive function initiates the automated installation of an application contained inside an archive. The application must already have an installer in the archive.

VOID InstallArchive(
    LPCTSTR lpArchive  // archive to install
);

Parameters

lpArchive

[in] Pointer to a null-terminated string that specifies the full path of the archive to install.

The archive must be supported for decompression. Use the GetExtractableArchivesEx function to obtain a list of archives supported for decompression. Furthermore, a "Structured" decompression profile must exist for the archive. Use the GetExtractionProfilesEx function to obtain a list of supported decompression profiles for the archive.

The archive must contain a setup program. InstallArchive looks for files named "setup.exe" or "install.exe" in the archive.

Return Values

This function does not return any values.

Remarks

InstallArchive invokes the decompression plug-in mapped to the given archive type, and extracts entire archive contents to a temporary folder. The plug-in is responsible for displaying progress and feedback to the user during the extraction process. The plug-in must also handle error conditions.

Once the extraction is complete, InstallArchive starts the setup program. The function returns when the setup program finishes execution. The temporary folder must be manually deleted using the EraseWorkingFiles function.

Use the CheckOutArchive function for archives which do not contain built-in installers.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetExtractableArchivesEx, GetExtractionProfilesEx, CheckOutArchive, EraseWorkingFiles


CheckOutArchive

Codex API: Archives

CheckOutArchive

The CheckOut Archive function extracts all files from an archive and creates a program group with shortcuts for files of indicated types.

VOID CheckOutArchive(
    LPCTSTR lpArchive,  // archive to check-out
    LPCTSTR lpPath,     // base output folder
    LPCTSTR lpIcons     // file types to create icons for
);

Parameters

lpArchive

[in] Pointer to a null-terminated string that specifies the full path of the archive to check-out.

The archive must be supported for decompression. Use the GetExtractableArchivesEx function to obtain a list of archives supported for decompression.

Furthermore, a "Structured" decompression profile must exist for the archive. Use the GetExtractionProfilesEx function to obtain a list of supported decompression profiles for the archive.

lpPath

[in] Pointer to a null-terminated string specifying the base output folder for the extracted files. UNC paths are accepted.

The archive contents will be extracted to the folder <lpPath>\<lpArchive>, using the archive name as a subfolder.

lpIcons

[in] Pointer to a null-terminated string formatted as COMMATEXT indicating which file types to create icons for. Multiple file types can be specified. File types must include the file extension and a leading period. File types are not case-sensitive.

A value of ".exe,.hlp,.chm" (without the quotes) will create icons for all executable and help files in the archive.

Return Values

This function does not return any values.

Remarks

CheckOutArchive invokes the decompression plug-in mapped to the given archive type. The plug-in is responsible for displaying progress and feedback to the user. The plug-in must also handle error conditions. Once extraction is complete, the desired icons are created and CheckOutArchive returns.

Use the InstallArchive function for archives which contain built-in installers.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetExtractableArchivesEx, GetExtractionProfilesEx, InstallArchive, COMMATEXT


ConvertArchive

Codex API: Archives

ConvertArchive

The Convert Archive function converts archives from one type to another.

VOID ConvertArchive(
    LPCTSTR lpArchive,    // archive to convert
    LPCTSTR lpNewArchive  // new archive name
);

Parameters

lpArchive

[in] Pointer to a null-terminated string that specifies the full path of the archive to convert.

The archive must be supported for decompression. Use the GetExtractableArchivesEx function to obtain a list of archives supported for decompression.

Furthermore, a "Structured" decompression profile must exist for the archive. Use the GetExtractionProfilesEx function to obtain a list of supported decompression profiles for the archive.

lpNewArchive

[in] Pointer to a null-terminated string specifying the full path of the new archive to create.

The archive must be supported for compression. Use the GetCompressibleArchivesEx function to obtain a list of archives supported for compression.

Furthermore, a "Structured" compression profile must exist for the archive. Use the GetCompressionProfilesEx function to obtain a list of supported compression profiles for the archive.

Return Values

This function does not return any values.

Remarks

ConvertArchive first invokes the decompression plug-in mapped to the given archive type and extracts all archive contents to a temporary folder. The plug-in is responsible for displaying progress and feedback to the user. The plug-in must also handle error conditions.

Once extraction is complete, ConvertArchive invokes the compression plug-in mapped to the new archive and recompresses all the extracted files. Again, the compression plug-in displays progress and handles errors.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetExtractableArchivesEx, GetExtractionProfilesEx, GetCompressibleArchivesEx, GetCompressionProfilesEx


ViewUpdateArchive

Codex API: Archives

ViewUpdateArchive

The ViewUpdate Archive function views a file inside an archive. If the viewed file has changed when the viewer exists, the archive may be updated with the new file.

VOID ViewUpdateArchive(
    LPCTSTR lpArchive,   // archive to view/update
    LPCTSTR lpItem,      // file to view/update
    BOOL bPrompt         // prompt for update
);

Parameters

lpArchive

[in] Pointer to a null-terminated string that specifies the full path of the archive containing the item to view.

To enable viewing, the archive must be supported for decompression. Use the GetExtractableArchivesEx function to obtain a list of archives supported for decompression. Furthermore, a "Structured" decompression profile must exist for the archive. Use the GetExtractionProfilesEx function to obtain a list of supported decompression profiles for the archive.

To enable updating of changed viewed items, the archive must be supported for compression. Use the GetCompressibleArchivesEx function to obtain a list of archives supported for compression. Furthermore, a "Structured" compression profile must exist for the archive. Use the GetCompressionProfilesEx function to obtain a list of supported compression profiles for the archive.

lpItem

[in] Pointer to a null-terminated string specifying the file inside the archive to be viewed/updated.

If the file is stored inside the archive with path information, lpItem must include that exact path information.

Only a single file may be viewed at a time.

bPrompt

[in] Specifies if the update should be performed automatically, or the user should be asked before updating.

If bPrompt is TRUE and the viewed item has been changed, the user will be prompted on whether to update the archive with the modified item. If bPrompt is FALSE and the viewed item has been changed, the archive will be automatically updated.

If the viewed item has not changed, or the archive type does not support updating, this parameter has no effect.

Return Values

This function does not return any values.

Remarks

ViewUpdateArchive first invokes the decompression plug-in mapped to the given archive type and extracts the selected item to a temporary folder. The plug-in is responsible for displaying progress and feedback to the user. The plug-in must also handle error conditions.

After extraction, ViewUpdateArchive finds the associated application with the extracted item and opens the item with this application. If an associated application cannot be found, ViewUpdateArchive uses the default viewer instead. See the SetGenericViewer function for information on configuring the default viewer.

After the viewer application exits, if the file time of the item remains the same, ViewUpdateArchive returns. Otherwise, if present, the compression plug-in mapped to the archive is invoked and the updated item recompressed into the archive. Again, the compression plug-in displays progress and handles errors.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetExtractableArchivesEx, GetExtractionProfilesEx, GetCompressibleArchivesEx, GetCompressionProfilesEx, SetGenericViewer


GetArchiveTools

Codex API: Archives

GetArchiveTools

The GetArchiveTools function obtains the list of custom tools associated with an archive.

Note This function is provided for backwards compatibility only. Newer applications should use the GetArchiveToolsEx function.

LPCTSTR GetArchiveTools(
    LPCTSTR lpArchive     // archive format
);

Parameters

lpArchive

[in] Pointer to a null-terminated string that specifies the archive for which custom tool information should be returned.

The lpArchive parameter must include the archive extension only. The extension may include wildcards.

Return Values

The function returns a list of all available archive tools formatted as COMMATEXT.

If no archive tools are available, the function returns NULL.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetArchiveToolHints, RunArchiveTool


GetArchiveToolsEx

Codex API: Archives

GetArchiveToolsEx

The GetArchiveToolsEx function obtains the list of custom tools associated with an archive.

INT GetArchiveToolsEx(
    LPCTSTR lpArchive,  // archive format
    LPTSTR lpTools      // archive tools
);

Parameters

lpArchive

[in] Pointer to a null-terminated string that specifies the archive for which custom tool information should be returned.

The lpArchive parameter must include the archive extension only. The extension may include wildcards.

lpTools

[out] Pointer to a buffer that receives the list of all available archive tools formatted as COMMATEXT. If no archive tools are available, the function returns NULL.

Pass NULL in this parameter to request the required size for the buffer.

Return Values

The return value specifies the required size of the buffer, excluding the number of bytes necessary for a terminating null character.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetArchiveToolHintsEx, RunArchiveTool


GetArchiveToolHints

Codex API: Archives

GetArchiveToolHints

The GetArchiveToolHints function obtains the list of hints for custom tools associated with an archive.

Note This function is provided for backwards compatibility only. Newer applications should use the GetArchiveToolHintsEx function.

LPCTSTR GetArchiveToolHints(
    LPCTSTR lpArchive         // archive format
);

Parameters

lpArchive

[in] Pointer to a null-terminated string that specifies the archive for which custom tool hint information should be returned.

The lpArchive parameter must include the archive extension only. The extension may include wildcards.

Return Values

The function returns a list of all available archive tool hints formatted as COMMATEXT.

If no archive tool hints are available, the function returns NULL.

The tool hints returned are at corresponding positions with the actual tools returned by the GetArchiveTools function. For instance, the 3rd tool hint returned by the GetArchiveToolHints function is for the 3rd tool returned by the GetArchiveTools function.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetArchiveTools, RunArchiveTool


GetArchiveToolHintsEx

Codex API: Archives

GetArchiveToolHintsEx

The GetArchiveToolHintsEx function obtains the list of hints for custom tools associated with an archive.

INT GetArchiveToolHintsEx(
    LPCTSTR lpArchive,      // archive format
    LPTSTR lpHints          // archive tool hints
);

Parameters

lpArchive

[in] Pointer to a null-terminated string that specifies the archive for which custom tool hint information should be returned.

The lpArchive parameter must include the archive extension only. The extension may include wildcards.

lpHints

[out] Pointer to a buffer that receives the list of all available archive tool hints formatted as COMMATEXT. If no archive tools are available, the function returns NULL.

The tool hints returned are at corresponding positions with the actual tools returned by the GetArchiveToolsEx function. For instance, the 3rd tool hint returned by the GetArchiveToolHintsEx function is for the 3rd tool returned by the GetArchiveToolsEx function.

Pass NULL in this parameter to request the required size for the buffer.

Return Values

The return value specifies the required size of the buffer, excluding the number of bytes necessary for a terminating null character.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetArchiveToolsEx, RunArchiveTool


RunArchiveTool

Codex API: Archives

RunArchiveTool

The Run ArchiveTool function starts an archive specific tool.

VOID RunArchiveTool(
    LPCTSTR lpArchive,  // archive to run tool on
    LPCTSTR lpItems,    // files inside archive for tool to work on
    LPCTSTR lpTool      // archive specific tool
);

Parameters

lpArchive

[in] Pointer to a null-terminated string that specifies the full path of the archive the tool should be run on.

lpItems

[in] Pointer to a null-terminated string formatted as COMMATEXT specifying the files inside the archive against which the tool should be run.

You may pass NULL in this parameter if the tool does not require this information. Tools which effect the entire archive (such as self-extracting archive creation tools) are examples of such tools.

lpTool

[in] Specifies the archive specific tool to be run.

Use the GetArchiveToolsEx function to obtain a list of archive specific tools.

Return Values

This function does not return any values.

Remarks

RunArchiveTool invokes the plug-in associated with the archive specific tool. The plug-in is responsible for displaying progress and feedback to the user. The plug-in must also handle error conditions. The plug-in may display any additional dialog boxes and custom interfaces required for the execution of the tool.

RunArchiveTool returns once the invoked plug-in finishes execution.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetArchiveToolsEx, GetArchiveToolHintsEx


GetCompressionProfiles

Codex API: Profiles

GetCompressionProfiles

The GetCompressionProfiles function obtains the list of plug-in defined data compression settings stored as a collection of profiles.

Note This function is provided for backwards compatibility only. Newer applications should use the GetCompressionProfilesEx function.

LPCTSTR GetCompressionProfiles(
    LPCTSTR lpArchive            // archive format
);

Parameters

lpArchive

[in] Pointer to a null-terminated string that specifies the archive for which profile information should be returned.

The lpArchive parameter must include the archive extension only. The extension may include wildcards.

Use the GetCompressibleArchives function to obtain the list of archives supported for compression.

Return Values

The function returns a list of all available profiles formatted as COMMATEXT.

Below is the list of standard Codex defined archive profiles:

Profile

Meaning

Default

The default profile. This profile is guaranteed to exist if the archive operation is supported at all.

Structured

Internal Codex profile. This profile is used during the execution of Codex defined archive tools.

Shell

The shell profile. This profile is used during shell operations. For example, when the user right-clicks an archive in Windows Explorer and selects an archive action, the shell profile is used.

Other profiles may be provided by the plug-in supporting the archive. In this case, the profiles will carry meaningful names such as "Maximum Compression".

You may create new profiles using the EditCompressionProfile function. You should not create profiles named "Default", "Structured", "Shell" if they do not already exist.

You may delete existing profiles using the DeleteCompressionProfile function. You should not delete profiles named "Default", "Structured", "Shell" if they already exist.

An application is recommended to use the Default profile for most archive tasks.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetCompressibleArchives


GetCompressionProfilesEx

Codex API: Profiles

GetCompressionProfilesEx

The GetCompressionProfilesEx function obtains the list of plug-in defined data compression settings stored as a collection of profiles.

INT GetCompressionProfilesEx(
    LPCTSTR lpArchive,         // archive format
    LPTSTR lpProfiles          // compression profiles
);

Parameters

lpArchive

[in] Pointer to a null-terminated string that specifies the archive for which profile information should be returned.

The lpArchive parameter must include the archive extension only. The extension may include wildcards.

Use the GetCompressibleArchivesEx function to obtain the list of archives supported for compression.

lpProfiles

[out] Pointer to a buffer that receives the list of all available compression profiles formatted as COMMATEXT.

Pass NULL in this parameter to request the required size for the buffer.

Below is the list of standard Codex defined archive profiles:

Profile

Meaning

Default

The default profile. This profile is guaranteed to exist if the archive operation is supported at all.

Structured

Internal Codex profile. This profile is used during the execution of Codex defined archive tools.

Shell

The shell profile. This profile is used during shell operations. For example, when the user right-clicks an archive in Windows Explorer and selects an archive action, the shell profile is used.

Other profiles may be provided by the plug-in supporting the archive. In this case, the profiles will carry meaningful names such as "Maximum Compression".

You may create new profiles using the EditCompressionProfile function. You should not create profiles named "Default", "Structured", "Shell" if they do not already exist.

You may delete existing profiles using the DeleteCompressionProfile function. You should not delete profiles named "Default", "Structured", "Shell" if they already exist.

An application is recommended to use the Default profile for most archive tasks.

Return Values

The return value specifies the required size of the buffer, excluding the number of bytes necessary for a terminating null character.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetCompressibleArchivesEx, COMMATEXT


GetExtractionProfiles

Codex API: Profiles

GetExtractionProfiles

The GetExtractionProfiles function obtains the list of plug-in defined data decompression settings stored as a collection of profiles.

Note This function is provided for backwards compatibility only. Newer applications should use the GetExtractionProfilesEx function.

LPCTSTR GetExtractionProfiles(
    LPCTSTR lpArchive           // archive format
);

Parameters

lpArchive

[in] Pointer to a null-terminated string that specifies the archive for which profile information should be returned.

The lpArchive parameter must include the archive extension only. The extension may include wildcards.

Use the GetExtractableArchives function to obtain the list of archives supported for decompression.

Return Values

The function returns a list of all available profiles formatted as COMMATEXT.

Below is the list of standard Codex defined archive profiles:

Profile

Meaning

Default

The default profile. This profile is guaranteed to exist if the archive operation is supported at all.

Structured

Internal Codex profile. This profile is used during the execution of Codex defined archive tools.

Shell

The shell profile. This profile is used during shell operations. For example, when the user right-clicks an archive in Windows Explorer and selects an archive action, the shell profile is used.

Other profiles may be provided by the plug-in supporting the archive. In this case, the profiles will carry meaningful names such as "Maximum Compression".

You may create new profiles using the EditExtractionProfile function. You should not create profiles named "Default", "Structured", "Shell" if they do not already exist.

You may delete existing profiles using the DeleteExtractionProfile function. You should not delete profiles named "Default", "Structured", "Shell" if they already exist.

An application is recommended to use the Default profile for most archive tasks.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetExtractableArchives


GetExtractionProfilesEx

Codex API: Profiles

GetExtractionProfilesEx

The GetExtractionProfilesEx function obtains the list of plug-in defined data decompression settings stored as a collection of profiles.

INT GetExtractionProfilesEx(
    LPCTSTR lpArchive,        // archive format
    LPTSTR lpProfiles         // extraction profiles
);

Parameters

lpArchive

[in] Pointer to a null-terminated string that specifies the archive for which profile information should be returned.

The lpArchive parameter must include the archive extension only. The extension may include wildcards.

Use the GetExtractableArchivesEx function to obtain the list of archives supported for decompression.

lpProfiles

[out] Pointer to a buffer that receives the list of all available extraction profiles formatted as COMMATEXT.

Pass NULL in this parameter to request the required size for the buffer.

Below is the list of standard Codex defined archive profiles:

Profile

Meaning

Default

The default profile. This profile is guaranteed to exist if the archive operation is supported at all.

Structured

Internal Codex profile. This profile is used during the execution of Codex defined archive tools.

Shell

The shell profile. This profile is used during shell operations. For example, when the user right-clicks an archive in Windows Explorer and selects an archive action, the shell profile is used.

Other profiles may be provided by the plug-in supporting the archive. In this case, the profiles will carry meaningful names such as "Maximum Compression".

You may create new profiles using the EditExtractionProfile function. You should not create profiles named "Default", "Structured", "Shell" if they do not already exist.

You may delete existing profiles using the DeleteExtractionProfile function. You should not delete profiles named "Default", "Structured", "Shell" if they already exist.

An application is recommended to use the Default profile for most archive tasks.

Return Values

The return value specifies the required size of the buffer, excluding the number of bytes necessary for a terminating null character.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetExtractableArchivesEx, COMMATEXT


EditCompressionProfile

Codex API: Profiles

EditCompressionProfile

The EditCompressionProfile starts the plug-in defined profile editor for a new or existing compression profile over the given archive.

VOID EditCompressionProfile(
    LPCTSTR lpArchive,        // archive format
    LPCTSTR lpProfile,        // profile to edit
);

Parameters

lpArchive

[in] Pointer to a null-terminated string that specifies the archive to which the profile belongs.

The lpArchive parameter must include the archive extension only. The extension may include wildcards.

lpProfile

[in] Pointer to a null-terminated string that identifies the profile to be edited.

You may use the GetCompressionProfilesEx function to obtain a list of existing profiles.

To create a new profile, pass a new profile name in this parameter. You should not use the values "Default", "Structured" or "Shell" when creating new profiles.

Return Values

This function does not return any values.

R emarks

This function starts the plug-in defined profile editor and immediately returns without waiting for the profile editor to close.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetCompressionProfilesEx


EditExtractionProfile

Codex API: Profiles

EditExtractionProfile

The EditExtractionProfile starts the plug-in defined profile editor for a new or existing decompression profile over the given archive.

VOID EditExtractionProfile(
    LPCTSTR lpArchive,       // archive format
    LPCTSTR lpProfile,       // profile to edit
);

Parameters

lpArchive

[in] Pointer to a null-terminated string that specifies the archive to which the profile belongs.

The lpArchive parameter must include the archive extension only. The extension may include wildcards.

lpProfile

[in] Pointer to a null-terminated string that identifies the profile to be edited.

You may use the GetExtractionProfilesEx function to obtain a list of existing profiles.

To create a new profile, pass a new profile name in this parameter. You should not use the values "Default", "Structured" or "Shell" when creating new profiles.

Return Values

This function does not return any values.

R emarks

This function starts the plug-in defined profile editor and immediately returns without waiting for the profile editor to close.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetExtractionProfilesEx


DeleteCompressionProfile

Codex API: Profiles

DeleteCompressionProfile

The DeleteCompressionProfile deletes the requested compression profile over the given archive.

VOID DeleteCompressionProfile(
    LPCTSTR lpArchive,          // archive format
    LPCTSTR lpProfile,          // profile to delete
);

Parameters

lpArchive

[in] Pointer to a null-terminated string that specifies the archive to which the profile belongs.

The lpArchive parameter must include the archive extension only. The extension may include wildcards.

lpProfile

[in] Pointer to a null-terminated string that identifies the profile to be deleted. The profile file is deleted from the hard disk.

You may use the GetCompressionProfilesEx function to obtain a list of existing profiles.

You should not use the values "Default", "Structured" or "Shell" when deleting profiles.

Return Values

This function does not return any values.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetCompressionProfilesEx


DeleteExtractionProfile

Codex API: Profiles

DeleteExtractionProfile

The DeleteExtractionProfile deletes the requested decompression profile over the given archive.

VOID DeleteExtractionProfile(
    LPCTSTR lpArchive,         // archive format
    LPCTSTR lpProfile,         // profile to delete
);

Parameters

lpArchive

[in] Pointer to a null-terminated string that specifies the archive to which the profile belongs.

The lpArchive parameter must include the archive extension only. The extension may include wildcards.

lpProfile

[in] Pointer to a null-terminated string that identifies the profile to be deleted. The profile file is deleted from the hard disk.

You may use the GetExtractionProfilesEx function to obtain a list of existing profiles.

You should not use the values "Default", "Structured" or "Shell" when deleting profiles.

Return Values

This function does not return any values.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetExtractionProfilesEx


LoadPlugIns

Codex API: Plug-Ins

LoadPlugIns

The LoadPlugIns function initializes the Codex runtime for use with an application. It loads all plug-ins installed on the system and creates internal structures necessary for mapping archives to plug-ins.

This function must be called before calling any other Codex API functions working directly with archives.

INT LoadPlugIns(VOID);

Parameters

This function has no parameters.

Return Values

The function returns the total number of archive types supported by currently installed plug-ins.

If there are no archive types currently supported, the function returns 0. This does not mean that there are no plug-ins installed on the system. See remarks for details.

Remarks

The mapping of plug-ins to archive types is a process which can be overseen and customized by the user. The user may associate different portions of different plug-ins with different archive types. Likewise, the user may dissociate all plug-ins from all archive types. Therefore, contrary to what the name indicates, this function does not load plug-ins but plug-ins as associated and ready for use with archive types.

When this function returns 0, do not automatically assume there are no plug-ins installed on the system.

When your Codex session is over, call the FreePlugIns function to free resource allocated by the Codex runtime.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, QueryArchiveEx, FreePlugIns


FreePlugIns

Codex API: Plug-Ins

FreePlugIns

The FreePlugIns function finalizes the Codex runtime used by an application. It frees all loaded plug-ins and internal structures mapping archives to plug-ins.

This function must be called before ending a Codex application to release all allocated resources for the Codex runtime back to the system.

VOID FreePlugIns(VOID);

Parameters

None.

Return Values

This function does not return any values.

Remarks

This function may also be used to update the Codex runtime of changes made to archive and/or plug-in configuration while a Codex application is running. First call FreePlugIns to deinitialize the Codex runtime and then call LoadPlugIns to reinitialize it.

See also the EditPlugInBindings function.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, LoadPlugIns, EditPlugInBindings


GetPlugIns

Codex API: Plug-Ins

GetPlugIns

The GetPlugIns function obtains the names of currently installed plug-ins on the system.

Note This function is provided for backwards compatibility only. Newer applications should use the GetPlugInsEx function.

LPCTSTR GetPlugIns(VOID);

Parameters

This function has no parameters.

Return Values

The function returns the names of all plug-ins installed on the system formatted as COMMATEXT.

If no plug-ins are installed, the function returns NULL.

Remarks

Functions which work with plug-ins expect to receive the plug-in names that this function returns as plug-in identifiers.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetArchives


GetPlugInsEx

Codex API: Plug-Ins

GetPlugInsEx

The GetPlugInsEx function obtains the names of currently installed plug-ins on the system.

INT GetPlugInsEx(
    LPTSTR lpPlugIns  // installed plug-ins
);

Parameters

lpPlugIns

[out] Pointer to a buffer that receives the names of all plug-ins installed on the system formatted as COMMATEXT.

If no plug-ins are installed, the function returns NULL.

Pass NULL in this parameter to request the required size for the buffer.

Return Values

The return value specifies the required size of the buffer, excluding the number of bytes necessary for a terminating null character.

Remarks

Functions which work with plug-ins expect to receive the plug-in names that this function returns as plug-in identifiers.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetArchivesEx, COMMATEXT


ShowPlugInAbout

Codex API: Plug-Ins

ShowPlugInAbout

The ShowPlugInAbout function displays the about box for the chosen plug-in.

VOID ShowPlugInAbout(
    LPCTSTR lpPlugIn  // name of plug-in
);

Parameters

lpPlugIn

[in] Pointer to a null-terminated string that specifies the name of the plug-in for which the about box should be displayed.

This name may be obtained using the GetPlugIns function.

Return Values

This function does not return any values.

Remarks

The about box is plug-in defined and may contain custom plug-in information.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetPlugIns


GetArchives

Codex API: Plug-Ins

GetArchives

The GetArchives function obtains the list of supported archives by all installed plug-ins on the system.

Note This function is provided for backwards compatibility only. Newer applications should use the GetArchivesEx function.

LPCTSTR GetArchives(VOID);

Parameters

This function has no parameters.

Return Values

The function returns the names of all archives supported by plug-ins installed on the system formatted as COMMATEXT.

The archive types are represented as file masks. For example, CAB archives will be represented as "*.CAB" (without the quotes). SZDD archives (archives created using Microsoft's COMPRESS.EXE program) will be represented as "*.??_". This assures that archives will always be correctly identified, even if the archive extension is variable, as in the SZDD archive type.

Remarks

This function does not return the actual list of archives which you may work with. The user may disable or reassign the mappings from plug-ins to the archive types they support. Certain archive types may therefore be partially or entirely disabled.

See the GetSupportedArchives and EditPlugInBindings functions for more information.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetPlugIns, GetSupportedArchives, EditPlugInBindings


GetArchivesEx

Codex API: Plug-Ins

GetArchivesEx

The GetArchivesEx function obtains the list of supported archives by all installed plug-ins on the system.

INT GetArchivesEx(
    LPTSTR lpArchives  // supported archives
);

Parameters

lpArchives

[out] Pointer to a buffer that receives the list of all archives supported by plug-ins installed on the system formatted as COMMATEXT.

The archive types are represented as file masks. For example, CAB archives will be represented as "*.CAB" (without the quotes). SZDD archives (archives created using Microsoft's COMPRESS.EXE program) will be represented as "*.??_". This assures that archives will always be correctly identified, even if the archive extension is variable, as in the SZDD archive type.

Pass NULL in this parameter to request the required size for the buffer.

Return Values

The return value specifies the required size of the buffer, excluding the number of bytes necessary for a terminating null character.

Remarks

This function does not return the actual list of archives which you may work with. The user may disable or reassign the mappings from plug-ins to the archive types they support. Certain archive types may therefore be partially or entirely disabled.

See the GetSupportedArchivesEx and EditPlugInBindings functions for more information.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetPlugInsEx, GetSupportedArchivesEx, EditPlugInBindings, COMMATEXT


GetArchivesByPlugIn

Codex API: Plug-Ins

GetArchivesByPlugIn

The GetArchivesByPlugIn function obtains the list of supported archive formats by the chosen plug-in.

Note This function is provided for backwards compatibility only. Newer applications should use the GetArchivesByPlugInEx function.

LPCTSTR GetArchivesByPlugIn(
    LPCTSTR lpPlugIn         // name of plug-in
);

Parameters

lpPlugIn

[in] Pointer to a null-terminated string that specifies the name of the plug-in for which archive support information should be returned.

This name may be obtained using the GetPlugIns function.

Return Values

The function returns a list of all archive types supported by the plug-in formatted as COMMATEXT.

The archive types are represented as file masks. For example, CAB archives will be represented as "*.CAB" (without the quotes). SZDD archives (archives created using Microsoft's COMPRESS.EXE program) will be represented as "*.??_". This assures that archives will always be correctly identified, even if the archive extension is variable, as in the SZDD archive type.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetPlugIns


GetArchivesByPlugInEx

Codex API: Plug-Ins

GetArchivesByPlugInEx

The GetArchivesByPlugInEx function obtains the list of supported archive formats by the chosen plug-in.

INT GetArchivesByPlugInEx(
    LPCTSTR lpPlugIn        // name of plug-in
    LPTSTR lpArchives       // supported archives
);

Parameters

lpPlugIn

[in] Pointer to a null-terminated string that specifies the name of the plug-in for which archive support information should be returned.

This name may be obtained using the GetPlugInsEx function.

lpArchives

[out] Pointer to a buffer that receives the list of all archive types supported by the plug-in formatted as COMMATEXT.

The archive types are represented as file masks. For example, CAB archives will be represented as "*.CAB" (without the quotes). SZDD archives (archives created using Microsoft's COMPRESS.EXE program) will be represented as "*.??_". This assures that archives will always be correctly identified, even if the archive extension is variable, as in the SZDD archive type.

Pass NULL in this parameter to request the required size for the buffer.

Return Values

The return value specifies the required size of the buffer, excluding the number of bytes necessary for a terminating null character.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetPlugInsEx, COMMATEXT


GetArchiveFunctionsByPlugIn

Codex API: Plug-Ins

GetArchiveFunctionsByPlugIn

The GetArchiveFunctionsByPlugIn function obtains the list of supported archive functions for the chosen archive format provided by the chosen plug-in.

Note This function is provided for backwards compatibility only. Newer applications should use the GetArchiveFunctionsByPlugInEx function.

LPCTSTR GetArchiveFunctionsByPlugIn(
    LPCTSTR lpArchive,               // archive format
    LPCTSTR lpPlugIn                 // name of plug-in
);

Parameters

lpArchive

[in] Pointer to a null-terminated string that specifies the archive format for which information is requested. This archive format must be supported by the plug-in specified in the lpPlugIn parameter.

Information on which archives are supported by which plug-ins may be obtained using the GetArchivesByPlugIn function.

lpPlugIn

[in] Pointer to a null-terminated string that specifies the name of the plug-in for which archive support information should be returned.

This name may be obtained using the GetPlugIns function.

Return Values

The function returns a list of all archive functions supported by the indicated plug-in for the given archive type. The list is formatted as COMMATEXT.

Below is the list of standard Codex defined archive functions:

Function

Meaning

List Archive Contents

The plug-in supports enumeration of files contained inside archives of this type.

Compress

The plug-in supports compressing files into archives of this type. Whether existing archives may be updated with new files is not specified.

Compression Settings

The plug-in supports user configuration of compression settings for this archive type.

Extract

The plug-in supports extracting files from archives of this type.

Extraction Settings

The plug-in supports user configuration of extraction settings for this archive type.

In addition to the standard functions above, each plug-in may define custom functions that are specific to the archive types they work with. For instance, ZIP archives support comments, therefore a custom plug-in function for ZIP archives may be "Edit Comment".

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetPlugIns, GetArchivesByPlugIn


GetArchiveFunctionsByPlugInEx

Codex API: Plug-Ins

GetArchiveFunctionsByPlugInEx

The GetArchiveFunctionsByPlugInEx function obtains the list of supported archive functions for the chosen archive format provided by the chosen plug-in.

INT GetArchiveFunctionsByPlugInEx(
    LPCTSTR lpArchive,              // archive format
    LPCTSTR lpPlugIn                // name of plug-in
    LPTSTR lpFunctions              // plug-in functions
);

Parameters

lpArchive

[in] Pointer to a null-terminated string that specifies the archive format for which information is requested. This archive format must be supported by the plug-in specified in the lpPlugIn parameter.

Information on which archives are supported by which plug-ins may be obtained using the GetArchivesByPlugInEx function.

lpPlugIn

[in] Pointer to a null-terminated string that specifies the name of the plug-in for which archive support information should be returned.

This name may be obtained using the GetPlugInsEx function.

lpFunctions

[out] Pointer to a buffer that receives the list of all archive functions supported by the indicated plug-in for the given archive type. The list is formatted as COMMATEXT.

Pass NULL in this parameter to request the required size for the buffer.

Below is the list of standard Codex defined archive functions:

Function

Meaning

List Archive Contents

The plug-in supports enumeration of files contained inside archives of this type.

Compress

The plug-in supports compressing files into archives of this type. Whether existing archives may be updated with new files is not specified.

Compression Settings

The plug-in supports user configuration of compression settings for this archive type.

Extract

The plug-in supports extracting files from archives of this type.

Extraction Settings

The plug-in supports user configuration of extraction settings for this archive type.

In addition to the standard functions above, each plug-in may define custom functions that are specific to the archive types they work with. For instance, ZIP archives support comments, therefore a custom plug-in function for ZIP archives may be "Edit Comment".

Return Values

The return value specifies the required size of the buffer, excluding the number of bytes necessary for a terminating null character.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetPlugInsEx, GetArchivesByPlugInEx, COMMATEXT


StartSplash

Codex API: Common Dialog Boxes

StartSplash

The StartSplash function displays the standard Codex application startup screen.

This function may be called very early during application startup to entertain the user while loading the application.

VOID StartSplash(
    LPCTSTR lpTitle,  // name of application
    LPCTSTR lpIcon    // points to path of application executable file
);

Parameters

lpTitle

[in] Pointer to a null-terminated string that specifies the name of the Codex application that is currently starting. This value is displayed on the splash screen beneath the "MimarSinan Codex Family Member:" text.

lpIcon

[in] Pointer to a null terminated string that specifies the full path of the executable file of the application that is currently starting. An icon is extracted from this file and displayed superimposed on top of the main Codex logo on the splash screen.

Return Values

This function does not return any values.

Remarks

The function displays the requested splash screen and returns immediately, allowing the application to continue initialization.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, EndSplash, CodexAbout


EndSplash

Codex API: Common Dialog Boxes

EndSplash

The EndSplash function removes the standard Codex application startup screen.

This function must be called only after the StartSplash function has been called.

VOID EndSplash(VOID);

Parameters

None.

Return Values

This function does not return any values.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, StartSplash, CodexAbout


CodexAbout

Codex API: Common Dialog Boxes

CodexAbout

The CodexAbout function displays the standard Codex about box.

VOID CodexAbout(
    HICON hIcon,          // handle to application icon
    LPCTSTR lpProduct,    // name of application
    LPCTSTR lpCopyright,  // application copyright
    LPCTSTR lpDesign,     // application developer
    LPCTSTR lpDesignURL,  // application developer URL
    LPCTSTR lpVersion     // application version
);

Parameters

hIcon

[in] Handle to application icon. This icon is displayed in the top left corner of the about box.

lpProduct

[in] Pointer to a null terminated string that specifies the name of the Codex application.

lpCopyright

[in] Pointer to a null terminated string that contains application copyright information.

lpDesign

[in] Pointer to a null terminated string that contains information about the developer of the application.

lpDesignURL

[in] Pointer to a null terminated string that specifies the URL of the developer of the application. This is a clickable link.

lpVersion

[in] Pointer to a null terminated string that contains application version information text.

Return Values

This function does not return any values.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, StartSplash, EndSplash


EditCodexAssociations

Codex API: Common Dialog Boxes

EditCodexAssociations

The EditCodexAssociations function displays a common dialog box allowing the user to associate archives with the Codex runtime. This is used to assure that when a user opens an archive in Windows Explorer, the archive will open with a Codex application.

VOID EditCodexAssociations(VOID);

Parameters

None.

Return Values

This function does not return any values.

Remarks

The common dialog box this function displays gives the user liberty in choosing archive associations. For each archive, the user may:

  • Associate the archive with Codex, or

  • Explicitly prevent Codex from owning the archive.

Use the ForceCodexAssociations function to forcefully own all archives instead. Use the CheckCodexAssociations function to determine if there have been any changes to associations since the last edit.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, ForceCodexAssociations, CheckCodexAssociations


EditPlugInBindings

Codex API: Common Dialog Boxes

EditPlugInBindings

The EditPlugInBindings function displays a common dialog box allowing the user to map the various functions plug-ins offer to archives they support.

BOOL EditPlugInBindings(VOID);

Parameters

None.

Return Values

Returns TRUE if mappings have changed.

Returns FALSE if mappings have not changed.

Remarks

If EditPlugInBindings returns TRUE, the calling application should restart the Codex runtime to update internal mapping structures. The Codex runtime may fall into an inconsistent state if not restarted after mappings have changed.

Use the FreePlugIns and LoadPlugIns functions in succession to restart the Codex runtime.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, FreePlugIns, LoadPlugIns


CheckCodexAssociations

Codex API: Shell

CheckCodexAssociations

The CheckCodexAssociations function checks to see if archive types are associated with the Codex runtime. This is used to assure that when a user opens an archive in Windows Explorer, the archive will open with a Codex application.

VOID CheckCodexAssociations(VOID);

Parameters

None.

Return Values

This function does not return any values.

Remarks

This function works in two ways:

  • If this is the first time the function is called system-wide, the check will fail as no archives have yet been associated with Codex. You should then call the EditCodexAssociations or the ForceCodexAssociations function to set associations.

  • On subsequent calls, the check fails only if set associations have changed.

This function also registers Codex shell extensions. Codex shell extensions are managed by the Codex runtime.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, ForceCodexAssociations, EditCodexAssociations


ForceCodexAssociations

Codex API: Shell

ForceCodexAssociations

The ForceCodexAssociations function forcefully associates all archive types with the Codex runtime. Whenever a user opens an archive in Windows Explorer, the archive will open with a Codex application.

SHORT ForceCodexAssociations(VOID);

Parameters

None.

Return Values

This function always returns 0.

Remarks

This function first obtains the list of all supported archives by currently installed plug-ins, and then registers Codex as the associated application for each of those archive formats.

To enable the user which archive types are associated and which aren't, use the EditCodexAssociations function.

To check if file associations have changed since the last association, use the CheckCodexAssociations function.

This function also registers Codex shell extensions. Codex shell extensions are managed by the Codex runtime.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, CheckCodexAssociations, EditCodexAssociations


GetGenericViewer

Codex API: Shell

GetGenericViewer

The GetGenericViewer function obtains information on the default file viewer application to be used for viewing/editing files inside archives during a file view/update operation.

Note This function is provided for backwards compatibility only. Newer applications should use the GetGenericViewerEx function.

LPCTSTR GetGenericViewer(VOID);

Parameters

This function has no parameters.

Return Values

The function returns the full path to the current default file viewer, such as "c:\windows\notepad.exe" (without the quotes).

If no default viewer exists, the function returns NULL.

Remarks

The default file viewer is only used when a file inside an archive cannot be opened by any one of the registered applications on the system, meaning that it is an unrecognized file type.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, SetGenericViewer


GetGenericViewerEx

Codex API: Shell

GetGenericViewerEx

The GetGenericViewerEx function obtains information on the default file viewer application to be used for viewing/editing files inside archives during a file view/update operation.

INT GetGenericViewerEx(
    LPTSTR lpViewer      // generic viewer
);

Parameters

lpViewer

[out] Pointer to a buffer that receives the full path to the current default file viewer, such as "c:\windows\notepad.exe" (without the quotes).

If no default viewer exists, the function returns NULL.

Pass NULL in this parameter to request the required size for the buffer.

Return Values

The return value specifies the required size of the buffer, excluding the number of bytes necessary for a terminating null character.

Remarks

The default file viewer is only used when a file inside an archive cannot be opened by any one of the registered applications on the system, meaning that it is an unrecognized file type.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, SetGenericViewer


SetGenericViewer

Codex API: Shell

SetGenericViewer

The SetGenericViewer function sets the file viewer application to be used for viewing/editing files inside archives during an archive view/update operation.

VOID SetGenericViewer(
    LPCTSTR lpViewer   // path to viewer application
);

Parameters

lpViewer

[in] Pointer to a null-terminated string that specifies the full path of the default viewer/editor application to use.

Example: c:\windows\notepad.exe

Return Values

This function does not return any values.

Remarks

The default file viewer is only used when a file inside an archive cannot be opened by any one of the registered applications on the system, meaning that it is an unrecognized file type.

Once set, the default file viewer will remain valid for the remainder of the Codex session. The Codex session ends when the Codex runtime is unloaded from memory, typically at application exit.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetGenericViewerEx


RegisterCodexApplication

Codex API: Shell

RegisterCodexApplication

The RegisterCodexApplication function sets an application as the default handler for Codex archives opened in Windows Explorer.

BOOL RegisterCodexApplication(
    LPCTSTR lpName,             // application name
    LPCTSTR lpEXE,              // executable path
    LPCTSTR lpDDE               // DDE conversation topic
);

Parameters

lpName

[in] Pointer to a null-terminated string that specifies the name of the application.

lpEXE

[in] Pointer to a null-terminated string that specifies the full path of the application executable.

lpDDE

[in] Pointer to a null-terminated string that specifies the DDE conversation topic if the application supports DDE.

DDE allows an application to open multiple documents selected from the shell within a single running instance. See the Windows Platform SDK for more information.

Specify NULL in this parameter to indicate your application does not support DDE.

Return Values

If the function succeeds, the return value is TRUE.

If the function fails, the return value is FALSE. Check your access rights to the registry.

Remarks

If a single Codex archive is selected and opened in Windows Explorer, an application registered with RegisterCodexApplication will launch, having the archive filename as its first command line parameter.

If multiple Codex archives are selected and opened in Windows Explorer:

  • If DDE was used, Windows Explorer will start a DDE conversation with the topic indicated in the lpDDE parameter and send the application information on each of the selected archives.

  • If DDE was not used, Windows Explorer will start separate copies of the application for each selected archive, having the respective archive filenames as separate command line parameters for each instance of the application.

RegisterCodexApplication associates an application only with archives already assigned to Codex. For more information on assigning archives to Codex, see the CheckCodexAssociations, EditCodexAssociations, and ForceCodexAssociations functions.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, CheckCodexAssociations, EditCodexAssociations, ForceCodexAssociations


EraseWorkingFiles

Codex API: Shell

EraseWorkingFiles

The EraseWorkingFiles function removes temporary files created by the Codex runtime during archive operations.

This function must only be called on application shutdown.

VOID EraseWorkingFiles(VOID);

Parameters

None.

Return Values

This function does not return any values.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header: Declared in mCodexAPI.h.
Library: Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions


CommaText

Codex API: Types

COMMATEXT

COMMATEXT is a pointer to a null terminated string. COMMATEXT contains a list of strings in system data format (SDF). All Codex API functions which pass a collection of strings use the COMMATEXT format.

Remarks

COMMATEXT contains a collection of multiple strings in a single comma-delimited string. For example, the collection of the following strings:

Stri,ng 1
Stri"ng 2
String 3
String4

will be represented as the following single string:

"Stri,ng 1","Stri""ng 2","String 3",String4

COMMATEXT values are parsed as SDF formatted text. For SDF format, strings are separated by commas or spaces, and optionally enclosed in double quotes. Double quote marks that are part of the string are repeated to distinguish them from the quotes that surround the string. Spaces and commas that are not contained within double quote marks are delimiters. Two commas next to each other will indicate an empty string, but spaces that appear next to another delimiter are ignored. For example, suppose we have the following COMMATEXT representation:

"Stri,ng 1", "Stri""ng 2" , String 3,String4

The actual list of strings will then be:

Stri,ng 1
Stri"ng 2
String
3
String4

See Also

Codex API Overview, Codex API Functions


Logo Certification

MimarSinan Codex 2.2: Certification

About Codex Logo Certification

A properly functioning Codex Plug-In or Codex Application is eligible to receive certification for displaying the Codex Logo shown below.

MimarSinan International will test all products that claim to be Codex compliant before awarding the logo. Submitting a product for logo compliancy testing constitutes your agreement with the following:

MimarSinan International reserves the right to deny any product logo certification for any reason. Logo certification is awarded at the sole discretion of MimarSinan International. This logo certification program may be cancelled at any time. You may not use the Codex Logo to defame and/or otherwise hurt the reputation of MimarSinan International and/or the Codex Plug-In Technology.
If your product is approved, you may display the Codex Logo at prominent locations in your product, such as the About Box, product documentation, and the product box. You may not modify or alter the Codex Logo in any way, and use it only in the form provided above.

For testing, you may send your products, along with documentation and other accompanying materials, electronically to mimar@mimarsinan.com . Contact mimar@mimarsinan.com for information on sending a physical copy of your product.

You are not permitted to use the logo in a product which has not been tested and approved by MimarSinan International for Codex compliancy.