Package plugins.wcx

This Package contains the Total Commander Java Packer Plugin Interface.

See:
          Description

Interface Summary
WCXPluginInterface This is the interface for Total Commander WCX plugins.
 

Class Summary
HeaderData HeaderData is a structure used in readerHeader.
HeaderDataEx HeaderData is a structure used in readerHeader.
OpenArchiveData OpenArchiveData is used in openArchive.
PackToMem PackToMem is used in packToMem.
WCXPluginAdapter  
 

Package plugins.wcx Description

This Package contains the Total Commander Java Packer Plugin Interface. Created by Ken Händel

Original Content used from WCX Writer's Reference.hlp:
Writing WCX packer plugins for Total Commander (Ver. 2.12) by Copyright (C) 2002 Christian Ghisler, C. Ghisler & Co. All Rights Reserved

Overview

This help file is about writing packer plugins for the file manager Total Commander, available on www.ghisler.com. It describes the functions you need to implement to add a specific packer to Total Commander. You should also look at the available sample packers (with source), which give you some insight on plugin programming. There are samples for Microsoft Visual C++ and Delphi.

A WCX is nothing more than a 32-bit Windows DLL renamed to *.WCX, which supports a list of specific functions. Total Commander loads this library dynamically at runtime with LoadLibrary(), and loads all available functions with GetProcAddress(). This means that not all functions described here must be implemented (see below). All functions use the STDCALL calling convention with no C++ name mangling (see below), exactly like in most standard system libraries in Windows.
The minimum functions needed for a read-only plugin are: All the following functions are optional.
If you want to support them, you need to implement
The first group allows to create or modify existing archives:
The following optional functions are for packing in memory:
This is used by Total Commander to create TAR.Plugin files in one step. For example, the .BZ2 plugin supports these functions. Most plugins can pack multiple files into one archive, and therefore will not need to implement these functions. The following function tells the plugin to check whether it can handle the specified unknown file or not:
How Total Commander calls the extraction functions:
Here is a simple pseudocode declaration how Total Commander calls the extraction functions:
  1. Loop to scan for files in the archive:
    OpenArchive()          with OpenMode==PK_OM_LIST
    repeat
       ReadHeader()
       ProcessFile(...,PK_SKIP,...)
    until error returned
    CloseArchive()
    
  2. Loop to extract files from the archive:
    OpenArchive()          with OpenMode==PK_OM_EXTRACT
    repeat
       ReadHeader()
       if WantToExtractThisFile()
          ProcessFile(...,PK_EXTRACT,...)
       else
          ProcessFile(...,PK_SKIP,...)
    until error returned
    CloseArchive()