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