Codex API: Installation


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



[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.


[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.


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.


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).
Declared in mCodexAPI.h.
Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, UnBindPlugIn, EditPlugInBindings