
 Plugin Development Kit version 0.01
 ===================================

 First, sorry for my bad english, please ;) If you find a grammar mistake, or
 you can translate the russian documentation to english, e-mail me, please.

 Plugin is an module, which add new feature to ARiD program. You can write a
 plugin for analysis some type of archive or any other purpose, you decide.

 Plugin system is fully implemented in the Win32 GUI version of ARiD, console
 version doesn't support plugins.

 Plugin for ARiD is an Win32 DLL, which should export two functions:

   char *pname(void);
   void pmain(plug_interface *pi);

 First is called at load of plugin and it should return plugin's name. This
 name will be displayed in the ARiD plugins' menu. Second function is main, it
 will be called when user choose the item in the plugin's menu. Plugin must do
 all work in this function. This functions follow C convention for passing
 parameters.

 Plugin can get additional information from `plug_interface' structure:

   typedef struct {
       unsigned char arid_version;
       unsigned char plug_version;
       char *fname;
       HWND hwnd;
       int (*processfile)(char *fname, arinfo *info, unsigned int opt);
   } plug_interface;

 First and second fields are versions of ARiD and the plugin system. Version is
 defined as ordinal number of release. So, for example, for version 0.10 the
 byte is 10 (0x0a). I recommend to check `plug_version' and minimal version
 needed to work your plugin.

 Field `fname' is pointer to file name, which displayed in `ARID_IDC_FILENAME'
 in ARiD GUI. If file name isn't defined then `fname' is pointer to 0.

 Field `hwnd' is handle of ARiD's main dialog. You can use following elements
 of the dialog with their ID:

   #define ARID_IDC_FILENAME 1007   // file name
   #define ARID_IDC_TYPE 1008       // archive type
   #define ARID_IDC_EXTENSION 1009  // real extension
   #define ARID_IDC_COPYRIGHT 1010  // copyright

 I guarantee that this ID's will not be changed in next version of ARiD.

 Field `processfile' is pointer to function of the same name. This function can
 detect type of archive, sfx-archive or installer. In C convention.

 Argument `fname' is pointer to file name for scanning. `info' is pointer to
 structure `arinfo':

   typedef struct {
       char *name;       // archive type
       char *extension;  // real extension
       char *copyright;  // copyright
   } arinfo;

 Last arument `opt' is options, that are choosed with set following flags:

   #define ARID_OP_NONE 0x00      // no options
   #define ARID_OP_FORCESFX 0x01  // force SFX scan

 The function return one of following values:

   #define ARID_ERROR_SUCCESS 0   // ok, file's information saved into `info'
   #define ARID_ERROR_FILEOPEN 1  // cannot open file

 Note: align of all structures is 1, that is not aligning. Check settings of
 your compiler or use headers from pdk/include.

 In next versions I can add other fields to `plug_interface' structure, but I
 will add them at end. Besides, the funcion get pointer to the structure, so,
 compatibility with plugins for previous versions will be preserved.

 ARiD search plugins in the plugins/ directory, no recursion. So, you should
 install plugins into root of the plugins/ directory, but documentation and
 other materials - into sub-directories. File plugins/ignore.lst contain list of
 file names, which will not be loaded by ARiD. You should separate file names by
 new lines, besides you can use one-line comments started with symbol `#'. You
 can disable all plugins with uncheck `Load Plugins' flag in the ARiD GUI. To
 apply changes you should restart the program.

 If you have writed a plugin than e-mail me it, please.

 --
 Veacheslav Patkov <patkov-mail@mail.ru>
 http://patkov-site.narod.ru/
