MexCom Manual

From XentaxWiki
Jump to: navigation, search



MultiExCommanderHelp43 01.png

MultiEx Commander

4.3.0

User’s Manual

© 2006 Xentax Foundation

http://www.xentax.com




Introduction

MultiEx Commander is a tool that will enable you to open game resource archives (GRAs) to examine their content. Games mostly come with GRAs that usually contain that game’s resources, such as sounds, music files, textures and scripts. The GRAs can be very large files, in most games, but it depends on their specific content. GRAs come in many different formats, depending largely on the authors of the game, and one could try to create a new viewer or extractor for each new GRA encountered. The strength of MultiEx Commander lies in its power to handle a vast amount of different GRA formats (GRAFs) at once. Supporting hundreds and hundreds of different games, of which the majority can also be edited, MultiEx Commander is unique in the world. Note that many if not most of the supported GRAFs have also been applied to pack copyrighted resources in a GRA. What MultiEx Commander does is offer a way to unpack and alter game archives, but does not support in any way illegal unpacking or alteration of GRAs that contain copyrighted material. As a user, you should read the manual of each game carefully, before you use MultiEx Commander to open and possibly alter its archives. Doing so may be forbidden, and the authors of MultiEx Commander will not take responsibility for such actions. Always consult the company that holds the rights to copyrighted material contained in GRAs before you do some public and heavy modding. Please read the legal disclaimer carefully!

The MultiEx Commander interface is pretty straightforward, with basic operation (viewing, extracting) much in the same way as other archivers around, such as WinRAR, WinZip a.o. Advanced operation (resource replacement and addition, creation of new GRAs) is done from within the MultiEx Editor, a built-in file handler that is accessible when GRAs are supported by it. Finally, advanced users and programmers can create new GRA support themselves, either by using the MexScriptor, a program that can be used to create scripts for MultiEx Commander to use to open the new GRAs, or by programming ActiveX DLL plug-ins or Rahly Plugins for MultiEx Commander. The average user, however, need not be concerned with these matters and can just use it to handle already existing supported GRAs.

Registration: As a registered "Friend of MultiEx" you can receive a personal code that will unlock some features in MultiEx Commander. Registration is possible by donation or other support of the project, like pointing out new formats, writing scripts, offering webspace, offering advertisements for MultiEx Commander on your website and more. Donation can occur via PayPal, and you will be send a registration key to your PayPal email address. Already many people have become a Friend of MultiEx!

Why is registration needed? A lot of time, energy and money are spend to ensure support for new games, maintain the website and create new features for the user. To do this, the Xentax Foundation requires some support from the community.


Basic Operation

MultiEx Commander operates on two levels. First, there’s the basic operation window that is shown upon start-up. Here you can perform simple but effective resource extraction and previewing. At the top of the window you are presented with large buttons. The represent the following actions, from left to right:

MultiExCommanderHelp43 02.png

Open

Clicking on this button will show the Open Archive dialog. In this dialog you can browse to a GRA of interest and select to open it in MultiEx Commander.

MultiExCommanderHelp43 03.png

Archives are processed via either scripts or plugins. There are two sources of scripts. Locally, scripts are stored in MultiEx Resource Files (MRF) and online they are retrieved from the Xentax WIKI (http://wiki.xentax.com). Select your source of choice (default is MRF) in the dialog. Next, you can tell the file filter to scan the current directory for files with extensions that match those found in the scripts. This way, the File Type drop down menu will only contain those that do. Just click on Ext in the Filter frame. Alternatively, you can select All which will cause the File Type drop-down menu to include all loaded scripts and all files in the current directory to be shown. Note that this works as an "Open As…" function. In the File Type drop-down menu you can then select the game archive of your choice. For instance, if you want to open C&C: Generals .BIG files, you open the menu, and scroll to ’C&C: Generals (.BIG)’. You can also open the menu and press ’C’ to quickly go to that letter, to speed up selection. When you have selected the game archive type of your choice, select the file you wish to open. When satisfied, click Open to open the file.

Extract

When you have opened a GRA of your choice, the main window will list the contents. You can now press the Extract button. Doing this immediately after you have just opened a GRA will extract ALL files. By default, all files are selected. If you left-click on a resource in the archive (without holding any other keys), only that file will be selected. You can hold down CTRL or SHIFT to select multiple files of your choice. If you are satisfied with your selection, press the Extract button to show the Extract dialog. You can now point to a directory of your choice, and create a new one if you wish to do so. If you are done, click ’Ok’ to start extraction of the currently selected files into the directory you have chosen. You can also ’Cancel’ and return to the main window without extraction.

MultiEx Editor

If you wish to switch to advanced mode, you use this button. This offers much more handling. See Advanced Operation for details. (This feature requires registration)

Options

You can set a number of options in MultiEx Commander, see MultiEx Commander Options for details.

View

Finally, the last large button in the basic operation window is the ’View’ button. Whenever you click on a resource in the archive, MultiEx Commander will perform a check whether files with this particular extension are associated with any program in windows. For instance, if a resource would have the following name, ’scripts.txt’, MultiEx Commander would probably find that a file with the extension .txt is associated with Notepad.exe. If and when MultiEx Commander finds that the extension is indeed associated with a program on your computer, the ’View’ button will be enabled. Clicking the ’View’ button will have the same effect as double-clicking the resource; the resource will be extracted temporarily and opened in the program that is associated with it. In the above mentioned example, MultiEx will start Notepad to show the ’script.txt’ resource.

Note: the buttons as discussed may sometimes be disabled. You can see this whenever there is a cross through the button in question. Naturally you cannot extract anything when there’s no open GRA, sometimes the MultiEx Editor cannot be started because the GRA in question is not supported by MultiEx Editor and finally, as already mentioned, the ’View’ button will be disabled if there’s no program associated with a selected resource.

New Archive

You can create a new game archive (if it is supported for that feature) by going to the File menu and selecting New… Then follow the on-screen instruction shown by the Wizard to create the new archive. This will be automatically opened in MultiEx Commander after creation. (This feature requires registration).

Extract table of contents

Whenever you have opened an archive and wish to see a list of its contents any other time outside of MultiEx Commander, go to the File menu and choose the "Extract table of contents" option. You will save the TOC as a Tab-delimited text file that you can open in any text editor or spreadsheet. Handy to show others what you found!

Advanced Operation : MultiEx Editor

MultiExCommanderHelp43 04.png

The panels

Whenever you have opened a game archive in the basic window that supports alteration, the large "Edit" button will become enabled. Click on this to open MultiEx Editor.

You will be presented with two main panels. The left panel is a file browser that you can use to search for files on your hard drive. To the right is the panel that lists the contents of the already opened GRA. Just use the vertical slides to browse through either panel.

Clicking on a file or a resource will start the automatic preview of that item, shown at the top of each panel. There you will see picture items as small images, text items as text, and sounds you will hear from your speakers. When you preview a picture item, you can click on the small picture shown to get a large preview. In addition, MultiEx Editor will show which program is associated with this type of file in Windows. To view it hvoer your mouse pointer over the (Hover mouse) caption. Below the description you will see the size of the previewed resource in the archive, in bytes. Note the latter may present a compressed size in some cases when viewing a resource, resulting in a larger file upon extraction.

In between the two main panels you will find two quick-operation buttons. At the top you will see the "Target for replacement" button (with an arrow to the right). Any file that is currently selected in the file panel (the left file browser panel) will be used to replace a resource selected in the game archive (the right archive panel) when this button is clicked. You will notice that the GRA panel has a number of columns. The first column lists the potential files to be used to replace the item that is listed, typically all read "<not replaced>" when you first start the editor. By double-clicking on the items in this column, or by clicking the "Target for replacement" button you can set the currently selected file as future replacement of the currently selected (or double-clicked) item. "Future", because you can first choose all the items to be replaced by files, after which you can start the actual process of replacement. Note that this will only work when the particular archive is supported for replacement (which is different from ’adding’ a file to an archive). The other button between the two panels is the "Quick-extract" button (with an arrow pointing to the left). Use it to immediately extract the selected item(s) in the right panel to the directory shown in the left panel.

The toolbar

The top part of MultiEx Editor comprises of a toolbar with the main controls. Game archives that were opened by multiex.dll, the main processor of GRAs in MultiEx Commander, can only be altered using these buttons, whilst game archives that required a dll-plug-in for processing can have additional options. The first button is the "View" button. When you click on any item in the two panels, you not only see a preview of it, when possible, but you may also see the View button enabled. This means that files of this type have been associated with some kind of program on your computer and you can open the file in this program. For instance, an item called "myitem.txt" may be opened in a program associated with text files, in many instances NOTEPAD.EXE. By clicking the View button you will open "myitem.txt" in that external program. Recall that you can see which program is associated with the item you clicked in the preview window, or at the bottom of MultiEx Editor (shown in the status bar of each panel). The second button on the toolbar is the "Replace current targets" button. Click this when you want to replace existing resources with files you specified in the resource panel (i.e. targets for replacement). Thus, when you are satisfied with the targeting, replacement will commence after you click the button. The "Clear all targets" button will remove any targets in the target column of the GRA panel. If for some reason you wish to start over, click this button, and any resources targeted for replacement will be cleared.

Additional plug-in options

MultiEx Commander runs largely on multiex.dll, a dynamic link library that processes the multiex scripts to use on different game archive formats. However, it is possible to write ActiveX/Rahly plug-ins for MultiEx Commander, which can have additional options to alter or work with game archives. For instance, the Painkiller PAK game archives are supported by such a DLL, which offers Creation of new PAK files, Addition of resources to existing PAK files and deletion of resources in existing PAK files, besides the basic Replacement of resources and Extraction of resources. Whenever an archive of your choice is processed by such a DLL and there are additional options besides the basic ones, you will notice the "Plug-in Options" button is visible in the toolbar. This is a drop down menu from which you may select the options, such as "Create new archive...", "Add selected files to archive" and "Delete selected resources". For your convenience, quick-tap buttons are also placed right below the archive contents panel. When supported, they will be enabled.

Creation Wizard

By clicking "Creation" you will be presented with a Creation Wizard that will ask you to specify creation parameters. These parameters were queried by the DLL, and it needs these specifications before it can successfully complete your request. The Creation Wizard shows you the list of values to specify along with the description of these values (two columns).

MultiExCommanderHelp43 05.png

Click on the "Value" items to change them. For instance, you will probably see a value that represents the filename of the archive to create. Click on the value to be presented with a new dialog in which you can specify how you wish to name the new archive. Alternatively, you may click on the "Change" button to alter any values you have currently selected. Values can represent Booleans (Yes/No), Filenames or text strings. When you are satisfied with the set options, you must select the "Continue" button to start the actual creation. You may "Cancel" at any time to abort the creation process.

If supported by the plug-in, you can Add files selected in the file panel to the resources in the GRA. Note that all the files selected will be inserted after the resource currently highlighted in the right GRA panel. Alternatively, it may be possible to Delete resources from a GRA. Just select all the resources you wish to delete and select this option. The plug-in will do the rest.

As the plug-in is an external program its process runs independently of MultiEx Commander. It may take a while! MultiEx Commander Ops are suspended until the plug-in completes its task. Please wait until it is done.

Batch replacement

Batch replacement is available from the Tools menu or the "Batch…" button below the file browser panel in the MultiEx Editor window. With this tool you can point to a directory of your choice to scan for files identical in name than resources in your archive. Any match will be targeted for replacement by the found file. This can come in handy if you wish to bulk-replace resources you have just edited. More specifically, you can opt to extract all resources of a GRA into a directory of your choice (either using the basic MultiEx Commander window or the MultiEx Editor), open and edit the resource you wish to change using some external program, without changing its name. When you are done editing the resources, you can run the Batch Replacement tool to target the resources in the GRA for replacement with your edited ones. Note that the tool will only set the targets; you will still have to hit the "Replace current targets" button in MultiEx Editor to start the replacement.

MultiExCommanderHelp43 06.png


Options

MultiExCommanderHelp43 07.png

There are a number of options you can set in the main options window, but these represent not all options. As you will see, you can choose additional tools and information from the program’s main menu.

First the options in the option window.

Check files’ info ascending

For extraction and processing of previews, you can tell MultiEx Commander to check whether subsequent files/resources overlap or not. If one resource overlaps the other in a GRA, MultiEx Commander will assume it is corrupt and not extract. Uncheck this if you don’t wish MultiEx Commander to do that.

Ignore 0 sized files

Check this to ignore resource entries that are 0 in length. Usually these will be identifiers of directories and need not be extracted.

Check the web for updates

You can set at what interval MultiEx Commander will check for a new executable or supported formats. You can choose between "On start-up", "Weekly", "Monthly" or "Never". Note that it will require MultiEx Commander to have access to the internet to successfully complete its task. If you choose ’Never" you can always check whenever you feel like it from the Web-menu in the main window.

Main resource

MultiEx Commander can use two different sources of scripts to process game resource archives. The Xentax WIKI is the online source, and this ensures the latest scripts are available for you. They are divided into Official and Unofficial scripts. The scripts are posted at the Xentax WIKI and every new script is Unofficial. If an unofficial script works good for your game archives, you can vote for them in the Supported Games dialog. If enough votes have been given, the script becomes Official. Official script are added to the other source of scripts with new releases of MultiEx Commander. The local source is the MultiEx Resource File (MRF). You can switch between the online source and local source at will. Please note that you will need to be connected to the internet to download the WIKI resources.

Debugmode

Check to start or don’t start the debug mode on start-up of MultiEx Commander. When started, MultiEx Commander will keep a process log in its "data" directory, which you can also view from the Log-menu in the main window, or from the Options window ("View log").

Autosave

You can tell MultiEx Commander to keep additional process logs besides the mentioned Debug-log. Check the ones you wish to keep and/or view them.

Autopreview

Set the time you wish an autopreview to appear in the main (basic) window. The minimum is 1 second and 5 seconds is maximum. You can also opt to disable autopreview of certain types of files, or to disable all automatic previewing. Note that you can quickly turn-off/on autopreview from the main window by clicking the bottom-left button.

Languages

You can select different languages for the main user interface here.

Save and Exit

Click to save the current settings and go back to the main window.

Additional Options

Web

From the main window (Basic Operation) you can use additional options. From the top-menu you can choose the Web menu to access the internet-based options. From here, you can

Check web for new version

Contact the XeNTaX website for news on updates. Update will occur automatically. You must be connected to the internet for this to succeed. (This feature requires registration)

Visit the discussion forum

This will start your internet explorer and go to the MultiEx Forum at http://forum.xentax.com

Visit the MultiEx website

This will start your browser and visit XeNTaX at:

http://multiex.xentax.com

Tools Menu

The Tools menu offers an important selection of tools.

File Association Preferences

In the Tools menu, you can edit the file association preferences of MultiEx Commander with files of supported file extensions.

MultiExCommanderHelp43 08.png

Simply check any and all file types you wish to be able to double-click from windows and automatically send to MultiEx Commander. In addition, You can Check All at once, Uncheck All at once or Check only those that are not associated yet ("none"). Click Ok to save these settings in the windows registry, or Cancel to abort.

View Detected Plugins

MultiExCommanderHelp43 09.png

This will show which information about the plugins (MexCom plugins, or Rahly’s Pluginmanager plugins) that have been detected. Use the tabs to switch to either plugin type.

Large Preview

MultiExCommanderHelp43 10.png

Checking this option in the Tools Menu will show a large preview of any picture you click in an archive. You will need to have turned on the Autopreview option for this. The large picture previews you can use to convert the pictures to different picture types (BMP, JPG, PCX, TIF, TGA, SGI, DDS, PNG, OIL, RAW). (This feature requires registration).

Scan file...

MultiEx Commander has implemented the Jaeder Naub file scanner to scan unknown archives for known media such as graphics, sounds and so forth.

MultiExCommanderHelp43 11.png

Just click on any file you wish to scan and JN will do the rest. If JN finds any resources of interest, MultiEx Commander will present you with a list to view or extract them.

BMS

The BMS refers to the Binary MultiEx Script menu, in which MexScript related tools are on offer. MexScript is the main script that is used by MultiEx Commander to process game resource archives. When compiled to a format that is understandable to the interpreter, it becomes Binary MultiEx Script.

View Format Specifications

This is a handy feature for the pro’s among you. It will recreate a format specification of a given BMS file (Binary MultiEx Script) so you can deduce how the archive is formatted. (This feature requires registration)

Run MexScript on...

You can open game resource archives with a MexScript text file. Just point to the text file and then point to the archive to open.

Run custom BMS script on...

For those of you that work with MexScriptor, the scripting program used to create scripts that MultiEx uses to process GRAs there’s still the option open a game resource archive of your choice with the compiled version of MexScript. Simply select the BMS file first, then the GRA. Use at your own risk though. (This feature requires registration)

Add custom BMS to MRF

With this you can point to a new BMS file (created with MexScriptor) and add it to the base MRF file (MultiEx Resource File). After you did so, you can just select the new format from the Open Archive menu. This is handy when scripts have been created at the MultiEx support forums ( http://forum.xentax.com ) and not yet implemented in MultiEx Commander. You can also create your own custom BMS and add it! (This feature requires registration)

MRF Manager

MultiExCommanderHelp43 12.png


The MRF manager is a powerful tool that will allow you to modify and create anew the resource files (MRF) that MultiEx Commander uses to operate. You can click on a MRF file in the database (left panel) and its contents will be shown (if not, click ’Show contents’). You can then choose to add a BMS file to this MRF file (right panel). Other options include creating a blank MRF file (using "New..."), adding another MRF file to the database (using "Add…") and deleting an MRF file from the database (using "Delete…"). Two important options are available still. First, the "Set Base" option. When clicked, the MRF file currently selected in the left panel will be set as the Base MRF file that will be used by MultiEx Commander. You can select any other at any time. Second, you can choose to "Revert" to the official MRF file that came with MultiEx Commander at any time. Clicking that button will reset MultiEx Commander to use the official file.

Use the MRF manager to create your own custom pack of BMS files, that you can then share with others! (This feature requires registration)

The Help Menu

Finally, the help menu offers a range of information, such as a list of all the GRAs supported, this help file, the End-user license, the About screen and a note for game developers. Importantly, the Supported Games list is where you can vote for the online scripts.

Supported games and Voting

In the Supported Games dialog you can vote for the validity of the online script (Xentax WIKI). When ever you have tried an unofficial WIKI script on a game resource archive that it is supposed to open, and it works, then you can vote Aye for this script. If it doesn’t work, and you are absolutely sure the script was intended to open that specific type of game resource archive, you can vote Naye. To do this, double click on the Vote text in the table at the same row of the script in question. A short dialog will appear in which you can select Aye, Naye, or Cancel. You can only vote once for each script! Note that you will have to use the WIKI as your current source of scripts, and a valid internet connection to vote!


Creating your own ActiveX DLL Plug-in (MexCom Plugin)

As a programmer, you can create your own ActiveX DLL to include additional games for support within MultiEx Commander. Thus, if you know how to handle a GRAF that is not supported yet by MultiEx Commander, you can make one yourself this way.

For MultiEx Commander to be able to work with it there are a number of things that need to be taken care of.

1. Create a directory in the plug-in dir of MultiEx Commander

Create a directory named after the extension of the GRA you wish to support, if it does not exist yet. So, if you want to support a *.LIB file from Game A, you create a dir named "lib" in the plug-in dir. Inside the lib directory you will copy your DLL, that will ave the name of the game. So, in the above example you would copy the dll as "gamea.dll".

2. Provide the necessary functions MultiEx Commander wants to call

For MultiEx Commander to work with the DLL it will expect specific functions to call. Here’s the list of functions it expects, defined as Visual Basic functions:

The ActiveX DLL Plug-in Functions:

Public Function bnPlug-info(Info() as string)

bnPlugInfo will provide you with details on the plug-in processes.

Info(0) = "Painkiller PAK Files Extractor" ’ verbose meaning

Info(1) = "2" ’ type = 2 , meaning you can ask it to extract/import

Info(2) = Major.Minor version number

Info(3) = "1" ’ allows importation (0 = no importation)

Info(4) = "5" ’ How many different variables will be returned

Info(5) = "0" ’ is there a resource type variable? (for the columns)

Info(6) = "0" ’ Create support (0 = no importation)

Info(7) = "0" ’ Delete support (0 = no importation)

Info(8) = "0" ’ Add support (0 = no importation)

Info(9) = "0" ’ Replace support (0 = no importation)

From Info(10) on come the descriptions of the variables specified in

Info(4). Example taken from Painkiller.dll:

’Info(10) = "Filename" ’ names of the variables returned (always at this position)

’Info(11) = "Compressed"

’Info(12) = "Offset"

’Info(13) = "Uncompressed"

’Info(14) = "Compression(%)"

Public Function iGetCreateArchiveInfo(CreateInfo() As String) As Long

Will return a list of things you should ask the user before running a iCreateArchive or iCreateFromDir function. The list provides description and

type in subsequent entries. So, if a plug-in wants a filename from the user,

it would return :

CreateInfo(0) = "Please specify filename"

Createinfo(1) = "filename"

etc.

What the Plug-in can ask for when creating a new archive is

really up to the plug-in These things MultiEx Commander can handle :

’boolean’ : Will prompt the user for a Yes or No
  (and return a 0 or a 1)
’filename’ : Will prompt the user to specify a savename
  (thus will return a string of the full path)
’text’ : Will prompt the user to specify some text

Public Function iList(strPath As String, iType As Integer, iStdList() As String) As Long

Will return a list of all the stuff in the archive.

- you give the path to the archive in strPath,

- you provide the type of list it needs to return in iStdList(). 1 will be mostly used.

- you return the contents in a list of strings

This depends on the type you specify. MultiEx will expect type 1 and ask for type 1:

List of contents Type 1 (iStdList):

An array of strings:

iStdList(0) = Number of files (in string-form, will need to be "File not supported" if the provided path can’t be processed by the plug-in)

iStdList(1) = path to the archive

iStdList(2) = the name of the plug-in and its version number

Then follow the actual entries, in sequential order.

the first would be :

iStdList(3) = Name of the resource in the archive (e.g. "textures\me.tga")

iStdList(4) = Size of the resource in the archive (will be the COMPRESSED size in case the resources are compressed)

iStdList(5) = Offset of the resource in the archive

iStdList(6) = Uncompressed size of the resource (this is 0 if there’s no compression)

OPTIONAL iStdList(7) = % compression (compressed size/uncompressed size*100) NOTE that this will not be so in case of uncompressed files.

In case of uncompressed files the next entry will begin at iStdList(7), in case of compression the next entry will begin at iStdList(8 ).

Public Function iCreateArchive(strDes As String, CreateInfo() As String) As Long

WIll create a new archive strDes using the info specified in CreateInfo. Note that the CreateInfo you RETURN to the Plug-in needs only have the values! Do not also return the descriptions!

Public Function iCreateFromDir(strPath As String, CreInfo() As String, Optional strDir As String) As Long

Will create a new archive containing all files below a specified strDir. Provide the CreationInfo as asked for by the Plug-in.

Public Function iDeleteResource(List() as string) As Long

iDeleteResource deletes all resources specified in List(). Make sure you get the name of the resource exact. Note that iDeleteResource expects you to procide the list in order of appearance in the archive, depending on the plug-in.

Public Function iExtract(strRes As String, strDes As String)

iExtract searches for strRes in an archive and extracts it as strDes

Public Function iImport(strRes() As String, strDes As String, Optional Number As Long = 0, Optional OverwriteNames As Boolean = False) As Integer

iImport replaces a given resource matching the full name with the one(s) in the provided list and to the (new file) strDes.

Note that the format of the strRes() is :

(0) Name in PAK FILE of res1

(1) Path to file to replace res1

(2) Name in PAK FILE of res2

(3) Path to file to replace res2

etc.

Public Function iAddResource(Where As Long, strPath() As String, strNames() As String) As Long

iAddResource will insert a list of strPaths (files) as strNames at position Where in the archive. (Use strNames if you want to change the name of the file in the archive prior addition).


RPM Type Plugins (Rahly Plugins)

a RPM plugin is just a renamed DLL with specific function exports, any language which can output in this fashion can create a plugin.

All functions are exported using the stdcall convention(i.e. C++'s __stdcall, Delphi's stdcall). There are several functions that MUST be exported, and then the rest are optional based on options returned from the plugin.

Structures and Values required by functions:

// TPluginInfo: Used by function mpGetPluginInfo
// Delphi
  TPluginInfo = packed record
    // Version 1.0
    Size: LongInt;
    Name: PChar;
    Author: PChar;
    URL: PChar;
    Email: PChar;
    Major: LongInt;
    Minor: LongInt;
  end;
  PPluginInfo = ^TPluginInfo;

// C++
typedef struct {
  long Size;
  char *Name;
  char *Author;
  char *URL;
  char *Email;
  long Major;
  long Minor;
} TPluginInfo, *PPluginInfo;

// TFormatInfo: used by mpGetFormatInfo
// Delphi
  TFormatInfo = packed record
    // Version 1.0
    Size: LongInt;
    FileMask: PChar; // This is better than an Interface
    GameName: PChar; // This is the name of the game it supports
    Flags: Int64;    // Support flags
  end;
  PFormatInfo = ^TFormatInfo;

// C++
typedef struct {
  long Size;
  char *FileMask;
  char *GameName;
  long long Flags;
} TFormatInfo, *PFormatInfo;

// Support flags for TFormatInfo.Flags
  SUPPORTFLAG_CREATE             = mpOpenArchve* functions support the creation of archives
  SUPPORTFLAG_IMPORT             = mpImport* functions are included and plugin supports the importing of files
  SUPPORTFLAG_EXPORT             = mpExport* functions are included and plugin supports the exporting of files
  SUPPORTFLAG_DELETE             = mpRemove* functions are included and Plugin supports the removal of files within the archive
  SUPPORTFLAG_REPLACE            = mpImport* functions allow the replacement of files that already exist
  SUPPORTFLAG_BYINDEX            = mp*ByIndex functions are included as well as mpIndex* functions
  SUPPORTFLAG_BYNAME             = mp*ByName functions are included as well as mpFind* functions
  SUPPORTFLAG_HANDLEISTREAM      = mpOpenArchiveBindStream mp*Stream functions
  SUPPORTFLAG_HANDLEFILE         = mpOpenArchive mp*File functions
  SUPPORTFLAG_TESTARCHIVE        = mpIs*AnArchive
  SUPPORTFLAG_EXPORTNAMEWILD     = mpExport* functions allow wildcard characters in the name to extract multiple files
  SUPPORTFLAG_IMPORTNAMEWILD     = mpImport* functions allow wildcard characters in the name to import a list of files 

// Delphi
  SUPPORTFLAG_CREATE             = $0000000000000001;
  SUPPORTFLAG_IMPORT             = $0000000000000002;
  SUPPORTFLAG_EXPORT             = $0000000000000004;
  SUPPORTFLAG_DELETE             = $0000000000000008;
  SUPPORTFLAG_REPLACE            = $0000000000000010;
  SUPPORTFLAG_BYINDEX            = $0000000000000020;
  SUPPORTFLAG_BYNAME             = $0000000000000040;
  SUPPORTFLAG_HANDLEISTREAM      = $0000000000000080;
  SUPPORTFLAG_HANDLEFILE         = $0000000000000100;
  SUPPORTFLAG_TESTARCHIVE        = $0000000000000200;
  SUPPORTFLAG_EXPORTNAMEWILD     = $0000000000000400;
  SUPPORTFLAG_IMPORTNAMEWILD     = $0000000000000800;

// C++

#define SUPPORTFLAG_CREATE         0x0000000000000001
#define SUPPORTFLAG_IMPORT         0x0000000000000002
#define SUPPORTFLAG_EXPORT         0x0000000000000004
#define SUPPORTFLAG_DELETE         0x0000000000000008
#define SUPPORTFLAG_REPLACE        0x0000000000000010
#define SUPPORTFLAG_BYINDEX        0x0000000000000020
#define SUPPORTFLAG_BYNAME         0x0000000000000040
#define SUPPORTFLAG_HANDLEISTREAM  0x0000000000000080
#define SUPPORTFLAG_HANDLEFILE     0x0000000000000100
#define SUPPORTFLAG_TESTARCHIVE    0x0000000000000200
#define SUPPORTFLAG_EXPORTNAMEWILD 0x0000000000000400
#define SUPPORTFLAG_IMPORTNAMEWILD 0x0000000000000800

// Values for the mpGetOptions and mpSetOption functions
  OPTIONTYPE_CREATE              = a list of Creation options
  OPTIONTYPE_EXPORT              = a list of export options
  OPTIONTYPE_IMPORT              = a list of import options
  OPTIONTYPE_FILEINFO            = a list of file information options
  OPTIONTYPE_INVALIDFILENAMECHAR = a list of characters that are invalid for a filename

// Delphi
  OPTIONTYPE_CREATE              = $00000001;
  OPTIONTYPE_EXPORT              = $00000002;
  OPTIONTYPE_IMPORT              = $00000003;
  OPTIONTYPE_FILEINFO            = $00000004;
  OPTIONTYPE_INVALIDFILENAMECHAR = $00000005;

// C++
#define OPTIONTYPE_CREATE              0x00000001
#define OPTIONTYPE_EXPORT              0x00000002
#define OPTIONTYPE_IMPORT              0x00000003
#define OPTIONTYPE_FILEINFO            0x00000004
#define OPTIONTYPE_INVALIDFILENAMECHAR 0x00000005

// Values for mpOpenArchive and mpOpenArchiveBindStream
  OPENFLAG_CREATENEW      = create archive even if exists
  OPENFLAG_OPENALWAYS     = create archive if doesn't exist
  OPENFLAG_FOREXPORT      = open archive for exporting only
  OPENFLAG_FORIMPORT      = open archive for importing only

// Delphi
  OPENFLAG_CREATENEW      = $00000001;
  OPENFLAG_OPENALWAYS     = $00000002;
  OPENFLAG_FOREXPORT      = $00000004;
  OPENFLAG_FORIMPORT      = $00000008;

// C++
#define OPENFLAG_CREATENEW      0x00000001
#define OPENFLAG_OPENALWAYS     0x00000002
#define OPENFLAG_FOREXPORT      0x00000004
#define OPENFLAG_FORIMPORT      0x00000008

// Plugin Error Codes that plugins return with functions mpGetLastError and mpGetErrorText
  pERROR_OK                    = Everything was ok
  pERROR_INVALID_PARM_1        = Invalid Parameter 1 for function
  pERROR_INVALID_PARM_2        = Invalid Parameter 2 for function
  pERROR_INVALID_PARM_3        = Invalid Parameter 3 for function
  pERROR_INVALID_PARM_4        = Invalid Parameter 4 for function
  pERROR_INVALID_PARM_5        = Invalid Parameter 5 for function
  pERROR_INVALID_PARM_6        = Invalid Parameter 6 for function
  pERROR_INVALID_PARM_7        = Invalid Parameter 7 for function
  pERROR_INVALID_PARM_8        = Invalid Parameter 8 for function
  pERROR_INVALID_PARM_9        = Invalid Parameter 9 for function
  pERROR_FILE_NOT_EXISTS       = File didn't Exist
  pERROR_FILE_CANT_OPEN        = Unable to open file
  pERROR_INVALID_FORMAT        = File is in an invalid format
  pERROR_STREAM_READ           = Error reading from the Stream
  pERROR_INVALID_HANDLE        = Invalid archive Handle
  pERROR_INVALID_INDEX         = Invalid Index handle
  pERROR_CREATE_ERROR          = Error creating archive
  pERROR_ARCHIVE_READ_ERROR    = Error reading archive
  pERROR_NO_MATCHES            = No Matches (FindFiles)
  pERROR_ARCHIVE_CLOSED        = Archive is closed
  pERROR_INVALID_OPTION        = Invalid Option
  pERROR_WILDCARDS_NOT_ALLOWED = Wildcards not allowed in function
  pERROR_INVALID_ARCHIVE       = Invalid Archive
  pERROR_FILE_EXISTS           = File Exists (Importing of file that exists and can't replace)
  pERROR_UNSUPPORTED           = Function unsupported

  pERROR_SPECIFICPLUGIN        = Start of Plugin Specific Errors

// Delphi
  pERROR_OK                    = $00000000;
  pERROR_INVALID_PARM_1        = $00000001;
  pERROR_INVALID_PARM_2        = $00000002;
  pERROR_INVALID_PARM_3        = $00000003;
  pERROR_INVALID_PARM_4        = $00000004;
  pERROR_INVALID_PARM_5        = $00000005;
  pERROR_INVALID_PARM_6        = $00000006;
  pERROR_INVALID_PARM_7        = $00000007;
  pERROR_INVALID_PARM_8        = $00000008;
  pERROR_INVALID_PARM_9        = $00000009;
  pERROR_FILE_NOT_EXISTS       = $0000000A;
  pERROR_FILE_CANT_OPEN        = $0000000B;
  pERROR_INVALID_FORMAT        = $0000000C;
  pERROR_STREAM_READ           = $0000000D;
  pERROR_INVALID_HANDLE        = $0000000E;
  pERROR_INVALID_INDEX         = $0000000F;
  pERROR_CREATE_ERROR          = $00000010;
  pERROR_ARCHIVE_READ_ERROR    = $00000011;
  pERROR_NO_MATCHES            = $00000012;
  pERROR_ARCHIVE_CLOSED        = $00000013;
  pERROR_INVALID_OPTION        = $00000014;
  pERROR_WILDCARDS_NOT_ALLOWED = $00000015;
  pERROR_INVALID_ARCHIVE       = $00000016;
  pERROR_FILE_EXISTS           = $00000017;
  pERROR_UNSUPPORTED           = $00000018;

  pERROR_SPECIFICPLUGIN        = $80000000;

// C++
#define pERROR_OK                    0x00000000
#define pERROR_INVALID_PARM_1        0x00000001
#define pERROR_INVALID_PARM_2        0x00000002
#define pERROR_INVALID_PARM_3        0x00000003
#define pERROR_INVALID_PARM_4        0x00000004
#define pERROR_INVALID_PARM_5        0x00000005
#define pERROR_INVALID_PARM_6        0x00000006
#define pERROR_INVALID_PARM_7        0x00000007
#define pERROR_INVALID_PARM_8        0x00000008
#define pERROR_INVALID_PARM_9        0x00000009
#define pERROR_FILE_NOT_EXISTS       0x0000000A
#define pERROR_FILE_CANT_OPEN        0x0000000B
#define pERROR_INVALID_FORMAT        0x0000000C
#define pERROR_STREAM_READ           0x0000000D
#define pERROR_INVALID_HANDLE        0x0000000E
#define pERROR_INVALID_INDEX         0x0000000F
#define pERROR_CREATE_ERROR          0x00000010
#define pERROR_ARCHIVE_READ_ERROR    0x00000011
#define pERROR_NO_MATCHES            0x00000012
#define pERROR_ARCHIVE_CLOSED        0x00000013
#define pERROR_INVALID_OPTION        0x00000014
#define pERROR_WILDCARDS_NOT_ALLOWED 0x00000015
#define pERROR_INVALID_ARCHIVE       0x00000016
#define pERROR_FILE_EXISTS           0x00000017
#define pERROR_UNSUPPORTED           0x00000018
#define pERROR_SPECIFICPLUGIN        0x80000000

List of Functions

mpGetInterfaceVersion (required) - Used to find out the interface version that the plugin uses

// Delphi
function mpGetInterfaceVersion(var Major, Minor: LongWord): LongBool; stdcall;
// C++
__declspec(dllexport) longbool __stdcall mpGetInterfaceVersion(unsigned int &Major, &Minor);

mpGetPluginInfo (required) - Used to get information about the plugin

// Delphi
function mpGetPluginInfo(var Info: TPluginInfo): LongBool; stdcall;
// C++
__declspec(dllexport) longbool __stdcall mpGetPluginInfo(TPluginInfo &Info);

mpGetFormatCount (required) - Returns the number of formats a plugin supports (Index 0-(Count-1))

// Delphi
function mpGetFormatCount(): LongWord; stdcall;
// C++
__declspec(dllexport) unsigned int __stdcall mpGetFormatCount(void);

mpGetFormatInfo (required) - Returns format information based on index value

// Delphi
function mpGetFormatInfo(FormatIndex: LongInt; var FormatInfo: TFormatInfo): LongBool; stdcall;
// C++
__declspec(dllexport) longbool __stdcall mpGetFormatCount(int FormatIndex; TFormatInfo &FormatInfo);

mpGetOptions (required) - Returns options based on the Option flags listed above
function should always at least return OPTIONTYPE_FILEINFO for a list of file information options. Options are always returned in a "Key=Value;Key=Value;etc". For file info returns values in "Value=Type" where value is "FILENAME", "FILESIZE", "FILEPOS", etc, and Types are "STRING", "INT8", "INT16", "INT32", "INT36", "WORD8", "WORD16", "WORD32", "WORD64".

// Delphi
function mpGetOptions(FormatIndex: LongInt; OptionType: LongInt): PChar; stdcall;
// C++
__declspec(dllexport) char * __stdcall mpGetOptions(int FormatIndex, OptionType);

mpSetOptions (required) - Allows the setting of options like how to create, how to extract, etc

// Delphi
function mpSetOptions(FormatIndex: LongInt; OptionType: LongInt; Name: PChar; Value: PChar): LongBool ; stdcall;
// C++
__declspec(dllexport) longbool __stdcall mpSetOptions(int FormatIndex, OptionType; char *Name, *Value);
To Do:
  mpOpenArchive
  mpOpenArchiveBindStream
  mpCloseArchive
  mpIndexCount
  mpIndexedInfo
  mpFindInfo
  mpFindFirstFile
  mpFindNextFile
  mpFindClose
  mpIsFileAnArchive
  mpIsStreamAnArchive
  mpExportFileByNameToFile
  mpExportFileByIndexToFile
  mpExportFileByNameToStream
  mpExportFileByIndexToStream
  mpGetLastError
  mpGetErrorText

Troubleshooting

For any issues, bugs and general help we advise you to visit the forums that exist for this purpose. You can find the MultiEx Forums here http://forum.xentax.com


Credits

MultiEx Commander is shareware, with some original source code still available at Sourceforge.net (http://sourceforge.net/projects/mexcom). It was started in DOS and programmed in Turbo C in 1997 by Mike Zuurman under the SadCom Ltd and XeNTaX label. In 2001 the first windows version was released, 3.0. 3 years later version 4.0.0 was released. MultiEx Commander’s basic features are free to use.

The latest version is 4.3 (September 2006). MultiEx Commander is developed by the Xentax Foundation.

Code:


Mike W. Zuurman (MexCom) _

Jeremy Walton (Pluginmanager)

Niklas Ekman (Jaeder Naub scanner)

Additional game support :


Michael Watson

KorNet

PXR

Logo graphics

Stephen Cameron

Xentax WIKI:

Mike Zuurman

Michael Watson

Arjan Dikhoff

Phillip Patriakeas

About Music:


Andrew Yates

Third part components as used by MultiEx Commander:

ZipIt (c) Richsoft

ZLib (C) 1995-1998 Jean-Loup Gailly, Mark Adler

BASS (C) 2003 Ian Luck, un4seen.com

devIL (c) 2003 Denton Woods,imagelib.org, licensed under LGPL 1998-1999

Chilkat XML (C) 2004-2005, Chilkat Software, Inc.

Ariad (R) Explorer Controls (C) 1999-2001 by Ariad Software

PECompact (C) 2006 Bitsum Technologies

The main website of MultiEx Commander is http://multiex.xentax.com

Legal disclaimer

The user has agreed to the following terms on usage of MultiEx Commander:

1. The MultiEx Commander product series (past and present) are

licensed under a GNU public license. The MultiEx Commander

product series will be referred to as all components installed

by the MultiEx Commander installer, plus the installer itself,

together named "MultiEx Commander" hereafter.

2. The ’user’ is from now on defined as every living being (such

as humans or other animals) that installs, runs, uses, operates

and/or works with MultiEx Commander.

3. The user agrees that Mike Zuurman and third party contributors,

together referred to as ’authors’ hereafter, are in no way

responsible for any physical damage done to anyone’s computer

hardware, software, physical body and other systems, or any other

malicious event, that may or may not have become present after

MultiEx Commander was installed and executed.

4. The user agrees that the Xentax Foundation, SadCom Ltd.,

Sourceforge.net and the authors of MultiEx Commander,

together referred to as ’producers’ hereafter,

cannot in any way be held accountable for

any of the malicious events mentioned under (3) exactly as shown

above that occur after usage of MultiEx Commander.

5. As a user of MultiEx Commander you will agree to respect the

international copyright laws that protect material (sounds,

scripts, graphics, binaries, text, interfaces, referred to as

’material’ hereafter) contained in the game resource archives

(named ’GRAs’ hereafter) that can be processed by MultiEx Commander.

6. The user agrees not to use MultiEx Commander to extract, copy,

distribute or change copyrighted material from any GRAs without

explicit permission from the company that holds the copyrights to

that material or to the package format of the GRA.

7. The user agrees to use any legally obtained material mentioned

under (5) and (6) for his personal, domestic and non-commercial

usage only, unless he has an agreement with the company that holds

the copyrights to the material for commercial exploitation.

8. The user agrees not to use MultiEx Commander to alter GRAs

supported for processing by MultiEx Commander without specific

permission from the holder of those GRAs’ copyrights.

9. The user agrees that the producers are not in any way legally

responsible for users that process GRAs by MultiEx Commander

illegally. Likewise, the producers are not in any way legally

responsible for illegal usage of copyrighted material extracted from

GRAs that can be processed by MultiEx Commander. As such, the user

agrees that the producers are not allegeable to file lawsuits against.

10. The user takes full legal responsibility for any illegal act he

or she may commit using MultiEx Commander and will free the producers

of any legal obligation in the event of any law broken by the user.

11. The user can support the Xentax Foundation by donation, either money

or natural resources. As a token of gratitude the user will recieve a

personal key that will unlock extra features in MultiEx Commander. The user

becomes a Friend of MultiEx this way. The user agrees to the condition that

the thus acquired personal code was not bought, but a gift from the Xentax

Foundation as a return favour for any support that the user may have given

to the Xentax Foundation. As such, the user cannot hold the Xentax Foundation

responsible for a non-functioning key, or when the unlocked features are

not to the satisfaction of the user or do not function correctly.

12. The user agrees that he has no rights to claim from the producers by

downloading or using MultiEx Commander.

If you agree with all of the above click "I agree" to

continue the MultiEx Commander package.

if you do not agree with all of the above click "I don’t agree"

to close the MultiEx Commander package without using it.</pre>