home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 March / Chip_2002-03_cd1.bin / zkuste / delphi / kompon / d5 / cak / CAKDIR.ZIP / UNACEV2.PAS < prev    next >
Pascal/Delphi Source File  |  2001-05-20  |  100KB  |  2,188 lines

  1. ////////////////////////////////////////////////////////////////////////
  2. // UnAceV2.pas v1.00
  3. //
  4. // Date created: 2001-02-24
  5. // Author: nikse@post11.tele.dk
  6.  
  7. unit UnAceV2;
  8.  
  9. interface
  10.  
  11. uses Windows, SysUtils;
  12.  
  13. ////////////////////////////////////////////////////////////////////////
  14. // Functions to be called from user program
  15.  
  16. function LoadAceDll(unpackdllpath : string) : Boolean;
  17. procedure UnLoadAceDll;
  18.  
  19. function CallACEList(ArchiveName : string) : integer;
  20. function CallACETest(ArchiveName : string) : integer;
  21. function CallACEExtract(ArchiveName     : string;
  22.                         DestinationDir  : string;
  23.                         DecryptPassword : string;
  24.                         DoExcludePath   : LongBool) : integer;
  25.  
  26.  
  27. ////////////////////////////////////////////////////////////////////////
  28. // ACE constants
  29. ////////////////////////////////////////////////////////////////////////
  30.  
  31. const
  32. // Constants for the tACECommentStruc.State field, which tells about
  33. // the result of the last comment extraction.
  34.   ACE_COMMENT_OK          = 0;    // comment extraction went fine
  35.   ACE_COMMENT_SMALLBUF    = 1;    // comment buffer too small to
  36.                                   // store the whole comment in
  37.   ACE_COMMENT_NONE        = 255;  // No comment present
  38.  
  39.  
  40. // Flag constants for tACEArchiveDataStruc.Flags field.
  41.   ACE_ARCFLAG_MAINCOMMENT   =       2;
  42.   ACE_ARCFLAG_SFX           =     512;
  43.   ACE_ARCFLAG_LIMITSFXJR    =    1024;  // is an SFX archive
  44.                                        // that supports 256k
  45.                                        // dictionary only
  46.   ACE_ARCFLAG_MULTIVOLUME   =    2048;
  47.   ACE_ARCFLAG_AV            =    4096;  // not used in ACL
  48.   ACE_ARCFLAG_RECOVERYREC   =    8192;
  49.   ACE_ARCFLAG_LOCK          =   16384;
  50.   ACE_ARCFLAG_SOLID         =   32768;
  51.  
  52. // Host system used to create an archive. Used at
  53. // tACEArchiveDataStruc.HostCreated field.
  54.   ACE_HOST_MSDOS            =       0;   // archive created by
  55.                                          // MSDOS ACE archiver
  56.   ACE_HOST_OS2              =       1;   // created by OS2 ACE
  57.   ACE_HOST_WIN32            =       2;   // created by Win32 ACE
  58.  
  59.  
  60.  
  61. // Flag constants for the tACEFileData.Flags field.
  62.   ACE_FILEFLAG_FILECOMMENT  =      2; // file has comment
  63.   ACE_FILEFLAG_SPLITBEFORE  =   4096; // continued from
  64.                                        // previous volume
  65.   ACE_FILEFLAG_SPLITAFTER   =   8192; // continued on
  66.                                        // next volume
  67.   ACE_FILEFLAG_PASSWORD     =  16384; // is encrypted
  68.   ACE_FILEFLAG_SOLID        =  32768; // uses data of previous
  69.                                        // files (solid mode)
  70.  
  71.  
  72. // Tells the Dll which compression level to use. (ACE only)
  73.   ACE_LEVEL_STORE    = 0; // save file only; do not compress
  74.   ACE_LEVEL_FASTEST  = 1; // compress very fast
  75.   ACE_LEVEL_FAST     = 2; // compress fast
  76.   ACE_LEVEL_NORMAL   = 3; // good compromise between speed and
  77.                           // compression rate
  78.   ACE_LEVEL_GOOD     = 4; // achieves good compression
  79.   ACE_LEVEL_BEST     = 5; // best compression; bit slow
  80.  
  81. ////////////////////////////////////////////////////////////////////////
  82. //                          Part 2.1: operation codes
  83. //
  84. // Passed to callback functions indicating the current operation.
  85.  
  86.   ACE_CALLBACK_OPERATION_LIST         =  0;
  87.   ACE_CALLBACK_OPERATION_TEST         =  1;
  88.   ACE_CALLBACK_OPERATION_ANALYZE      =  2;
  89.   ACE_CALLBACK_OPERATION_EXTRACT      =  3;
  90.   ACE_CALLBACK_OPERATION_ADD          =  4;
  91.   ACE_CALLBACK_OPERATION_REPACK       =  5;
  92.   ACE_CALLBACK_OPERATION_DELETE       =  6;
  93.   ACE_CALLBACK_OPERATION_REPAIR       =  7;    // repair without
  94.                                                // recovery record
  95.   ACE_CALLBACK_OPERATION_SETCMT       =  8;
  96.   ACE_CALLBACK_OPERATION_ENCRYPT      =  9;
  97.   ACE_CALLBACK_OPERATION_KEEP         = 10;    // file is to be
  98.                                                // taken along
  99.                                                // without recompress
  100.   ACE_CALLBACK_OPERATION_RECOVER      = 11;    // begin of
  101.                                                // recovering archive
  102.                                                // by recovery record
  103.   ACE_CALLBACK_OPERATION_HEADSEARCH   = 12;    // begin of searching
  104.                                                // for file headers
  105.   ACE_CALLBACK_OPERATION_RECRECSEARCH = 13;    // begin of searching
  106.                                                // for recovery record
  107.   ACE_CALLBACK_OPERATION_ADDSFX       = 14;
  108.   ACE_CALLBACK_OPERATION_LOCK         = 15;
  109.   ACE_CALLBACK_OPERATION_ADDAV        = 16;    // not used in ACL
  110.   ACE_CALLBACK_OPERATION_ADDRECOVREC  = 17;
  111.   ACE_CALLBACK_OPERATION_REGISTER     = 18;    // not used in ACL
  112.  
  113.  
  114. ////////////////////////////////////////////////////////////////////////
  115. //                  Part 2.2: callback function return codes
  116. // One of these result codes has to be returned by the application-based
  117. // callback functions.
  118.  
  119.   ACE_CALLBACK_RETURN_OK      =    0;      // also "yes" at
  120.                                            // requests
  121.   ACE_CALLBACK_RETURN_NO      =    1;      // no, do not/
  122.                                            // do not retry
  123.   ACE_CALLBACK_RETURN_CANCEL  =    2;      // abort operation
  124.  
  125.  
  126. ////////////////////////////////////////////////////////////////////////
  127. //                     Part 2.3: callback structure types
  128. // States of which type the passed structure is when a callback function
  129. // is called. The type is written to the StructureType field.
  130.  
  131.   ACE_CALLBACK_TYPE_GLOBAL    =    0;
  132.  
  133.                 // type of structure is
  134.                 // tACECallbackGlobalStruc
  135.                 //-------------------------------------------------------------
  136.                 // callback function   | codes using this structure
  137.                 // --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
  138.                 // InfoCallbackProc    | ACE_CALLBACK_INFO_GENERALKEY      // not used in ACL
  139.                 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  140.                 // ErrorCallbackProc   | ACE_CALLBACK_ERROR_MEMORY // für ManyFilesError und ExtractMem andere Codes verwenden!?
  141.                 //                     | ACE_CALLBACK_ERROR_REGISTER       // not used in ACL
  142.                 //                     | ACE_CALLBACK_ERROR_READKEY        // not used in ACL
  143.                 //                     | ACE_CALLBACK_ERROR_WRITEKEY       // not used in ACL
  144.                 //                     | ACE_CALLBACK_ERROR_NOWINACEKEY    // not used in ACL
  145.                 //                     | ACE_CALLBACK_ERROR_NOACTIVEACEKEY // not used in ACL
  146.                 //                     | ACE_CALLBACK_ERROR_UNCSPACE       // wird noch nicht verwendet!
  147.                 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  148.                 // RequestCallbackProc | ACE_CALLBACK_REQUEST_REGISTER     // not used in ACL
  149.                 //
  150.  
  151.  
  152.   ACE_CALLBACK_TYPE_ARCHIVE = 1;
  153.  
  154.                 // type of structure is
  155.                 // tACECallbackArchiveStruc
  156.                 //-------------------------------------------------------------
  157.                 // callback function   | codes using this structure
  158.                 // --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
  159.                 // InfoCallbackProc    | ACE_CALLBACK_INFO_TMPARCCREATE
  160.                 //                     | ACE_CALLBACK_INFO_TMPARCCREATEEND
  161.                 //                     | ACE_CALLBACK_INFO_ADDRECREC
  162.                 //                     | ACE_CALLBACK_INFO_ADDRECRECEND
  163.                 //                     | ACE_CALLBACK_INFO_RECREC
  164.                 //                     | ACE_CALLBACK_INFO_NORECREC
  165.                 //                     | ACE_CALLBACK_INFO_RECOVERED
  166.                 //                     | ACE_CALLBACK_INFO_NODAMAGE
  167.                 //                     | ACE_CALLBACK_INFO_FNDMAINHEAD
  168.                 //                     | ACE_CALLBACK_INFO_FILELISTCREATE
  169.                 //                     | ACE_CALLBACK_INFO_FILELISTCREATEEND
  170.                 //                     | ACE_CALLBACK_INFO_FILESORT
  171.                 //                     | ACE_CALLBACK_INFO_FILESORTEND
  172.                 //                     | ACE_CALLBACK_INFO_COPYEND
  173.                 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  174.                 // ErrorCallbackProc   | ACE_CALLBACK_ERROR_MODIFYVOLUME
  175.                 //                     | ACE_CALLBACK_ERROR_MODIFYLOCKEDARCHIVE
  176.                 //                     | ACE_CALLBACK_ERROR_AV                  // not used in ACL
  177.                 //                     | ACE_CALLBACK_ERROR_TOODAMAGED
  178.                 //                     | ACE_CALLBACK_ERROR_ARCHIVEEXISTS
  179.                 //                     | ACE_CALLBACK_ERROR_OPENREPAIRARCHIVE
  180.                 //                     | ACE_CALLBACK_ERROR_OPENARCHIVEREAD
  181.                 //                     | ACE_CALLBACK_ERROR_OPENARCHIVEWRITE
  182.                 //                     | ACE_CALLBACK_ERROR_READARCHIVE
  183.                 //                     | ACE_CALLBACK_ERROR_WRITEARCHIVE
  184.                 //                     | ACE_CALLBACK_ERROR_ALREADYSFX
  185.                 //                     | ACE_CALLBACK_ERROR_ADDSFXTOVOLUME
  186.                 //                     | ACE_CALLBACK_ERROR_ARCHIVEBROKEN
  187.                 //                     | ACE_CALLBACK_ERROR_ARCHIVESAVE
  188.                 //                     | ACE_CALLBACK_ERROR_NOFILES
  189.                 //                     | ACE_CALLBACK_ERROR_ISNOTANARCHIVE
  190.                 //                     | ACE_CALLBACK_ERROR_TEMPDIRCREATE
  191.                 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  192.                 // RequestCallbackProc | ACE_CALLBACK_REQUEST_MARKASSOLID
  193.                 //                     | ACE_CALLBACK_REQUEST_CHANGEVOLUME
  194.                 //                     | ACE_CALLBACK_REQUEST_ARCHIVEEXISTS
  195.                 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  196.                 // StateCallbackProc   | ACE_CALLBACK_STATE_STARTARCHIVE
  197.                 //
  198.  
  199.  
  200.   ACE_CALLBACK_TYPE_ARCHIVEDFILE = 2;
  201.  
  202.                 // type of structure is
  203.                 // tACECallbackArchivedFileStruc
  204.                 //-------------------------------------------------------------
  205.                 // callback function   | codes using this structure
  206.                 // --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
  207.                 // InfoCallbackProc    | ACE_CALLBACK_INFO_TMPARCCREATE
  208.                 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  209.                 // ErrorCallbackProc   | ACE_CALLBACK_ERROR_CREATIONNAMEINUSE
  210.                 //                     | ACE_CALLBACK_ERROR_HIGHERVERSION
  211.                 //                     | ACE_CALLBACK_ERROR_ENCRYPTIONCRC
  212.                 //                     | ACE_CALLBACK_ERROR_WRITE
  213.                 //                     | ACE_CALLBACK_ERROR_READ
  214.                 //                     | ACE_CALLBACK_ERROR_OPENREAD
  215.                 //                     | ACE_CALLBACK_ERROR_OPENWRITE //wird noch gar nich benutzt?? sollte aber - bei extract!
  216.                 //                     | ACE_CALLBACK_ERROR_FILENAMETOOLONG
  217.                 //                     | ACE_CALLBACK_ERROR_REPACKCRC
  218.                 //                     | ACE_CALLBACK_ERROR_EXCLUDEPATH
  219.                 //                     | ACE_CALLBACK_ERROR_METHOD
  220.                 //                     | ACE_CALLBACK_ERROR_EXTRACTSPACE
  221.                 //                     | ACE_CALLBACK_ERROR_CREATION
  222.                 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  223.                 // RequestCallbackProc | ACE_CALLBACK_REQUEST_OVERWRITE
  224.                 //                     | ACE_CALLBACK_REQUEST_DELETEARCHIVEDSYSFILE
  225.                 //                     | ACE_CALLBACK_REQUEST_ADDBROKENFILE
  226.                 //                     | ACE_CALLBACK_REQUEST_PASSWORD
  227.                 //                     | ACE_CALLBACK_REQUEST_OVERWRITESYSFILE
  228.                 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  229.                 // StateCallbackProc   | ACE_CALLBACK_STATE_STARTFILE
  230.                 //                     | ACE_CALLBACK_STATE_ENDNOCRCCHECK
  231.                 //
  232.  
  233.  
  234.   ACE_CALLBACK_TYPE_REALFILE = 3;
  235.  
  236.                 // type of structure is
  237.                 // tACECallbackRealFileStruc
  238.                 //-------------------------------------------------------------
  239.                 // callback function   | codes using this structure
  240.                 // --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
  241.                 // InfoCallbackProc    | ACE_CALLBACK_INFO_FILELISTADD
  242.                 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  243.                 // ErrorCallbackProc   | ACE_CALLBACK_ERROR_MOVEDELETE
  244.                 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  245.                 // RequestCallbackProc | ACE_CALLBACK_REQUEST_MOVEDELETEREALSYSFILE
  246.                 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  247.                 // StateCallbackProc   | ACE_CALLBACK_STATE_STARTFILE
  248.                 //
  249.  
  250.  
  251.   ACE_CALLBACK_TYPE_SPACE = 4;
  252.  
  253.                 // type of structure is
  254.                 // tACECallbackSpaceStruc
  255.                 //-------------------------------------------------------------
  256.                 // callback function   | codes using this structure
  257.                 // --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
  258.                 // ErrorCallbackProc   | ACE_CALLBACK_ERROR_TEMPDIRSPACE
  259.                 //                     | ACE_CALLBACK_ERROR_ARCHIVESPACE
  260.                 //
  261.  
  262.  
  263.   ACE_CALLBACK_TYPE_SFXFILE = 5;
  264.  
  265.                 // type of structure is
  266.                 // tACECallbackSFXFileStruc
  267.                 //-------------------------------------------------------------
  268.                 // callback function   | codes using this structure
  269.                 // --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
  270.                 // ErrorCallbackProc   | ACE_CALLBACK_ERROR_READINGSFXFILE
  271.                 //
  272.  
  273.  
  274.   ACE_CALLBACK_TYPE_COPY = 6;
  275.  
  276.                 // type of structure is
  277.                 // tACECallbackCopyStruc
  278.                 //-------------------------------------------------------------
  279.                 // callback function   | codes using this structure
  280.                 // --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
  281.                 // InfoCallbackProc    | ACE_CALLBACK_INFO_COPY
  282.                 //
  283.  
  284.  
  285.   ACE_CALLBACK_TYPE_PROGRESS = 7;
  286.  
  287.                 // type of structure is
  288.                 // tACECallbackProgressStruc
  289.                 //-------------------------------------------------------------
  290.                 // callback function   | codes using this structure
  291.                 // --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
  292.                 // StateCallbackProc   | ACE_CALLBACK_STATE_PROGRESS
  293.                 //
  294.  
  295.  
  296.   ACE_CALLBACK_TYPE_CRCCHECK = 8;
  297.  
  298.                 // type of structure is
  299.                 // tACECallbackCRCCheckStruc
  300.                 //-------------------------------------------------------------
  301.                 // callback function   | codes using this structure
  302.                 // --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
  303.                 // StateCallbackProc   | ACE_CALLBACK_STATE_ENDCRCCHECK
  304.                 //
  305.  
  306.  
  307.       //-----------------------------------------------------------------------
  308.       // These values are passed to the ACEInfoCallbackProc callback function
  309.       // to inform the application about actions (smaller parts of operations)
  310.       // which may take some time or other things that might be of interest.
  311.       //-----------------------------------------------------------------------
  312.  
  313.    ACE_CALLBACK_INFO_GENERALKEY = $100;
  314.  
  315.                                 // key is a general one (no own AV; own key
  316.                                 // is obtainable for a special price!?)
  317.                                 // not used in ACL
  318.                                 //---------------------------------------------
  319.                                 // structure type:
  320.                                 //   ACE_CALLBACK_TYPE_GLOBAL
  321.                                 // operations:
  322.                                 //   ACERegister
  323.  
  324.   ACE_CALLBACK_INFO_TMPARCCREATE = $110;
  325.  
  326.                                 // creating temporary archive for changes
  327.                                 //---------------------------------------------
  328.                                 // structure type:
  329.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  330.                                 // operations:
  331.                                 //   ACEAdd
  332.                                 //   ACESetComments
  333.                                 //   ACEEncryptFiles
  334.                                 //   ACEAddSFX
  335.                                 //   ACELock
  336.                                 //   ACEAddAV
  337.                                 //   ACERepair
  338.  
  339.  
  340.   ACE_CALLBACK_INFO_TMPARCCREATEEND = $111;
  341.  
  342.                                 // finished creating temporary archive
  343.                                 //---------------------------------------------
  344.                                 // structure type:
  345.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  346.                                 // operations:
  347.                                 //   ACEAdd
  348.                                 //   ACESetComments
  349.                                 //   ACEEncryptFiles
  350.                                 //   ACEAddSFX
  351.                                 //   ACELock
  352.                                 //   ACEAddAV
  353.                                 //   ACERepair
  354.  
  355.  
  356.   ACE_CALLBACK_INFO_ADDRECREC = $112;
  357.  
  358.                                 // adding recovery record
  359.                                 //---------------------------------------------
  360.                                 // structure type:
  361.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  362.                                 // operations:
  363.                                 //   ACEAdd
  364.                                 //   ACESetComments
  365.                                 //   ACEEncryptFiles
  366.                                 //   ACEAddSFX
  367.                                 //   ACELock
  368.                                 //   ACEAddAV
  369.                                 //   ACEAddRecoveryRecord
  370.                                 //   ACERepair
  371.  
  372.  
  373.   ACE_CALLBACK_INFO_ADDRECRECEND = $113;
  374.  
  375.                                 // finished adding recovery record
  376.                                 //---------------------------------------------
  377.                                 // structure type:
  378.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  379.                                 // operations:
  380.                                 //   ACEAdd
  381.                                 //   ACESetComments
  382.                                 //   ACEEncryptFiles
  383.                                 //   ACEAddSFX
  384.                                 //   ACELock
  385.                                 //   ACEAddAV
  386.                                 //   ACEAddRecoveryRecord
  387.                                 //   ACERepair
  388.  
  389.  
  390.   ACE_CALLBACK_INFO_RECREC = $114;
  391.  
  392.                                 // trying to recover files by recovery
  393.                                 // record; end indicated by
  394.                                 // ACE_CALLBACK_INFO_RECOVERED or
  395.                                 // ACE_CALLBACK_INFO_NODAMAGE
  396.                                 //---------------------------------------------
  397.                                 // structure type:
  398.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  399.                                 // operations:
  400.                                 //   ACERepair
  401.  
  402.  
  403.   ACE_CALLBACK_INFO_NORECREC = $115;
  404.  
  405.                                 // found no recovery record
  406.                                 //---------------------------------------------
  407.                                 // structure type:
  408.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  409.                                 // operations:
  410.                                 //   ACERepair
  411.  
  412.  
  413.   ACE_CALLBACK_INFO_RECOVERED = $116;
  414.  
  415.                                 // archive has been fully recovered
  416.                                 //---------------------------------------------
  417.                                 // structure type:
  418.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  419.                                 // operations:
  420.                                 //   ACERepair
  421.  
  422.  
  423.   ACE_CALLBACK_INFO_NODAMAGE = $117;
  424.  
  425.                                 // ACERepair detected by recovery record that
  426.                                 // the archive is not damaged
  427.                                 //---------------------------------------------
  428.                                 // structure type:
  429.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  430.                                 // operations:
  431.                                 //   ACERepair
  432.  
  433.  
  434.   ACE_CALLBACK_INFO_FNDMAINHEAD = $118;
  435.  
  436.                                 // found archive header
  437.                                 //---------------------------------------------
  438.                                 // structure type:
  439.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  440.                                 // operations:
  441.                                 //   ACERepair
  442.  
  443.  
  444.   ACE_CALLBACK_INFO_FILELISTCREATE = $119;
  445.  
  446.                                 // creating a file list of specified files
  447.                                 //---------------------------------------------
  448.                                 // structure type:
  449.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  450.                                 // operations:
  451.                                 //   ACEList
  452.                                 //   ACEDelete
  453.                                 //   ACETest
  454.                                 //   ACEExtract
  455.                                 //   ACEAdd
  456.                                 //   ACESetComments
  457.                                 //   ACEEncryptFiles
  458.  
  459.  
  460.   ACE_CALLBACK_INFO_FILELISTCREATEEND = $11a;
  461.  
  462.                                 // sent when creating the list of files
  463.                                 // is finished
  464.                                 //---------------------------------------------
  465.                                 // structure type:
  466.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  467.                                 // operations:
  468.                                 //   ACEList
  469.                                 //   ACEDelete
  470.                                 //   ACETest
  471.                                 //   ACEExtract
  472.                                 //   ACEAdd
  473.                                 //   ACESetComments
  474.                                 //   ACEEncryptFiles
  475.  
  476.  
  477.   ACE_CALLBACK_INFO_FILESORT = $11b;
  478.  
  479.                                 // sorting files (for solid compression)
  480.                                 //---------------------------------------------
  481.                                 // structure type:
  482.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  483.                                 // operations:
  484.                                 //   ACEAdd
  485.  
  486.  
  487.   ACE_CALLBACK_INFO_FILESORTEND = $11c;
  488.  
  489.                                 // sorting files (for solid compression)
  490.                                 //---------------------------------------------
  491.                                 // structure type:
  492.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  493.                                 // operations:
  494.                                 //   ACEAdd
  495.  
  496.  
  497.   ACE_CALLBACK_INFO_COPYEND = $11d;
  498.  
  499.                                 // copying a file finished
  500.                                 //---------------------------------------------
  501.                                 // structure type:
  502.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  503.                                 // operations:
  504.                                 //   ACEAdd
  505.                                 //   ACESetComments
  506.                                 //   ACEEncryptFiles
  507.                                 //   ACEAddSFX
  508.                                 //   ACELock
  509.                                 //   ACEAddAV
  510.                                 //   ACERepair
  511.  
  512.  
  513.   ACE_CALLBACK_INFO_FILELISTADD = $140;
  514.  
  515.                                 // called at creation of file list; the name
  516.                             // of the file just added to file list is
  517.                                 // passed in tACECallbackRealFileStruc
  518.                                 //---------------------------------------------
  519.                                 // structure type:
  520.                                 //   ACE_CALLBACK_TYPE_REALFILE
  521.                                 // operations:
  522.                                 //   ACEList
  523.                                 //   ACEDelete
  524.                                 //   ACETest
  525.                                 //   ACEExtract
  526.                                 //   ACEAdd
  527.                                 //   ACESetComments
  528.                                 //   ACEEncryptFiles
  529.  
  530.  
  531.   ACE_CALLBACK_INFO_COPY = $150;
  532.  
  533.                                 // copying a file; file name, file size and
  534.                                 // copied bytes are passed via
  535.                                 // tACECallbackCopyStruc
  536.                                 //---------------------------------------------
  537.                                 // structure type:
  538.                                 //   ACE_CALLBACK_TYPE_COPY
  539.                                 // operations:
  540.                                 //   ACEAdd
  541.                                 //   ACESetComments
  542.                                 //   ACEEncryptFiles
  543.                                 //   ACEAddSFX
  544.                                 //   ACELock
  545.                                 //   ACEAddAV
  546.                                 //   ACERepair
  547.  
  548.  
  549.   ACE_CALLBACK_ERROR_MEMORY = $200;
  550.  
  551.                                 // not enough memory to perform operation
  552.                                 // (dictionary too large?)
  553.                                 //---------------------------------------------
  554.                                 // structure type:
  555.                                 //   ACE_CALLBACK_TYPE_GLOBAL
  556.                                 // operations:
  557.                                 //   all
  558.  
  559.  
  560.   ACE_CALLBACK_ERROR_REGISTER = $201;
  561.  
  562.                                 // registration key is invalid (or wrong
  563.                                 // format?); not used in ACL
  564.                                 //---------------------------------------------
  565.                                 // structure type:
  566.                                 //   ACE_CALLBACK_TYPE_GLOBAL
  567.                                 // operations:
  568.                                 //   ACERegister
  569.  
  570.  
  571.   ACE_CALLBACK_ERROR_READKEY = $202;
  572.  
  573.                                 // key could not be read (does not exist or
  574.                                 // is invalid); not used in ACL
  575.                                 //---------------------------------------------
  576.                                 // structure type:
  577.                                 //   ACE_CALLBACK_TYPE_GLOBAL
  578.                                 // operations:
  579.                                 //   ACEInitDll
  580.  
  581.  
  582.   ACE_CALLBACK_ERROR_WRITEKEY = $203;
  583.  
  584.                                 // could not write key; not used in ACL
  585.                                 //---------------------------------------------
  586.                                 // structure type:
  587.                                 //   ACE_CALLBACK_TYPE_GLOBAL
  588.                                 // operations:
  589.                                 //   ACERegister
  590.  
  591.  
  592.   ACE_CALLBACK_ERROR_NOWINACEKEY = $204;
  593.  
  594.                                 // key not valid for WinACE; not used in ACL
  595.                                 //---------------------------------------------
  596.                                 // structure type:
  597.                                 //   ACE_CALLBACK_TYPE_GLOBAL
  598.                                 // operations:
  599.                                 //   ACERegister
  600.  
  601.  
  602.   ACE_CALLBACK_ERROR_NOACTIVEACEKEY = $205;
  603.  
  604.                                 // key not valid for ActiveACE; not used in ACL
  605.                                 //---------------------------------------------
  606.                                 // structure type:
  607.                                 //   ACE_CALLBACK_TYPE_GLOBAL
  608.                                 // operations:
  609.                                 //   ACERegister
  610.  
  611.  
  612.   ACE_CALLBACK_ERROR_UNCSPACE = $206;
  613.  
  614.                                 // Win95_OSR1-bug: it is impossible to
  615.                                 // get available space of network drives by
  616.                                 // an UNC name; ACE will not stop but
  617.                                 // assumes there are 4Gb free
  618.                                 // --> the operation might fail if free
  619.                                 // disk space is low
  620.                                 //---------------------------------------------
  621.                                 // structure type:
  622.                                 //   ACE_CALLBACK_TYPE_GLOBAL
  623.                                 // operations:
  624.                                 //   all
  625.  
  626.  
  627.   ACE_CALLBACK_ERROR_MODIFYVOLUME = $220;
  628.  
  629.                                 // modification of volumes not possible
  630.                                 //---------------------------------------------
  631.                                 // structure type:
  632.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  633.                                 // operations:
  634.                                 //   ACEAdd
  635.                                 //   ACESetComments
  636.                                 //   ACEEncryptFiles
  637.                                 //   ACEAddSFX
  638.                                 //   ACELock
  639.                                 //   ACEAddAV
  640.                                 //   ACEAddRecoveryRecord
  641.  
  642.  
  643.   ACE_CALLBACK_ERROR_MODIFYLOCKEDARCHIVE = $221;
  644.  
  645.                                 // modification of locked archive not possible
  646.                                 //---------------------------------------------
  647.                                 // structure type:
  648.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  649.                                 // operations:
  650.                                 //   ACEAdd
  651.                                 //   ACESetComments
  652.                                 //   ACEEncryptFiles
  653.                                 //   ACEAddSFX
  654.                                 //   ACELock
  655.                                 //   ACEAddAV
  656.                                 //   ACEAddRecoveryRecord
  657.  
  658.  
  659.   ACE_CALLBACK_ERROR_AV = $222;
  660.  
  661.                                 // AV of archive is NOT ok or does not match
  662.                                 // to the users AV (not used in ACL)
  663.                                 //---------------------------------------------
  664.                                 // structure type:
  665.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  666.                                 // operations:
  667.                                 //   ACEReadArchiveData
  668.                                 //   ACEList
  669.                                 //   ACEDelete
  670.                                 //   ACETest
  671.                                 //   ACEExtract
  672.                                 //   ACEAdd
  673.                                 //   ACERepair
  674.                                 //   ACESetComments
  675.                                 //   ACEEncryptFiles
  676.                                 //   ACEAddSFX
  677.                                 //   ACEAddAV
  678.                                 //   ACELock
  679.                                 //   ACEAddRecoveryRecord
  680.  
  681.  
  682.   ACE_CALLBACK_ERROR_TOODAMAGED =  $223;
  683.  
  684.                                 // can not repair by recovery record but
  685.                                 // can continue with normal repair
  686.                                 //---------------------------------------------
  687.                                 // structure type:
  688.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  689.                                 // operations:
  690.                                 //   ACERepair
  691.  
  692.  
  693.   ACE_CALLBACK_ERROR_ARCHIVEEXISTS = $224;
  694.  
  695.                                 // destination file name already used;
  696.                                 // may occur if at
  697.                                 // ACE_CALLBACK_ERROR_ARCHIVESPACE a
  698.                                 // direcory is specified where a file
  699.                                 // with the same name as the current archive
  700.                                 // already exists
  701.                                 //---------------------------------------------
  702.                                 // structure type:
  703.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  704.                                 // operations:
  705.                                 //   ACEAdd
  706.  
  707.  
  708.   ACE_CALLBACK_ERROR_OPENREPAIRARCHIVE = $225;
  709.  
  710.                                 // could not create archive for repairing
  711.                                 //---------------------------------------------
  712.                                 // structure type:
  713.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  714.                                 // operations:
  715.                                 //   ACERepair
  716.  
  717.  
  718.   ACE_CALLBACK_ERROR_OPENARCHIVEREAD = $226;
  719.  
  720.                                 // could not open archive/volume for reading
  721.                                 //---------------------------------------------
  722.                                 // structure type:
  723.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  724.                                 // operations:
  725.                                 //   ACEReadArchiveData
  726.                                 //   ACEList
  727.                                 //   ACETest
  728.                                 //   ACEExtract
  729.                                 //   ACERepair
  730.  
  731.  
  732.   ACE_CALLBACK_ERROR_OPENARCHIVEWRITE = $227;
  733.  
  734.                                 // could not open archive/volume for writing
  735.                                 //---------------------------------------------
  736.                                 // structure type:
  737.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  738.                                 // operations:
  739.                                 //   ACEDelete
  740.                                 //   ACEAdd
  741.                                 //   ACESetComments
  742.                                 //   ACEEncryptFiles
  743.                                 //   ACEAddSFX
  744.                                 //   ACELock
  745.                                 //   ACEAddAV
  746.                                 //   ACEAddRecoveryRecord
  747.                                 //   ACERepair
  748.  
  749.  
  750.   ACE_CALLBACK_ERROR_READARCHIVE = $228;
  751.  
  752.                                 // error reading from archive
  753.                                 // (source disk removed?)
  754.                                 //---------------------------------------------
  755.                                 // structure type:
  756.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  757.                                 // operations:
  758.                                 //   ACEReadArchiveData
  759.                                 //   ACEList
  760.                                 //   ACEDelete
  761.                                 //   ACETest
  762.                                 //   ACEExtract
  763.                                 //   ACEAdd
  764.                                 //   ACERepair
  765.                                 //   ACESetComments
  766.                                 //   ACEEncryptFiles
  767.                                 //   ACEAddSFX
  768.                                 //   ACEAddAV
  769.                                 //   ACELock
  770.                                 //   ACEAddRecoveryRecord
  771.  
  772.  
  773.   ACE_CALLBACK_ERROR_WRITEARCHIVE = $229;
  774.  
  775.                                 // error writing to archive
  776.                                 // (destination disk removed?)
  777.                                 //---------------------------------------------
  778.                                 // structure type:
  779.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  780.                                 // operations:
  781.                                 //   ACEDelete
  782.                                 //   ACEAdd
  783.                                 //   ACESetComments
  784.                                 //   ACEEncryptFiles
  785.                                 //   ACEAddSFX
  786.                                 //   ACELock
  787.                                 //   ACEAddAV
  788.                                 //   ACEAddRecoveryRecord
  789.                                 //   ACERepair
  790.  
  791.  
  792.   ACE_CALLBACK_ERROR_ALREADYSFX = $22a;
  793.  
  794.                                 // ca not make to SFX: is already SFX
  795.                                 //---------------------------------------------
  796.                                 // structure type:
  797.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  798.                                 // operations:
  799.                                 //   ACEAddSFX
  800.  
  801.  
  802.   ACE_CALLBACK_ERROR_ADDSFXTOVOLUME = $22b;
  803.  
  804.                                 // adding SFX to volumes not possible
  805.                                 //---------------------------------------------
  806.                                 // structure type:
  807.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  808.                                 // operations:
  809.                                 //   ACEAddSFX
  810.  
  811.  
  812.   ACE_CALLBACK_ERROR_ARCHIVEBROKEN = $22c;
  813.  
  814.                                 // archive is broken (damaged)
  815.                                 //---------------------------------------------
  816.                                 // structure type:
  817.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  818.                                 // operations:
  819.                                 //   ACEReadArchiveData
  820.                                 //   ACEList
  821.                                 //   ACEDelete
  822.                                 //   ACETest
  823.                                 //   ACEExtract
  824.                                 //   ACEAdd
  825.                                 //   ACERepair
  826.                                 //   ACESetComments
  827.                                 //   ACEEncryptFiles
  828.                                 //   ACEAddSFX
  829.                                 //   ACEAddAV
  830.                                 //   ACELock
  831.                                 //   ACEAddRecoveryRecord
  832.  
  833.   ACE_CALLBACK_ERROR_ARCHIVESAVE = $22d;
  834.  
  835.                                 // not enough space to save archive;
  836.                                 // but normally
  837.                                 // ACE_CALLBACK_ERROR_ARCHIVESPACE
  838.                                 // should allow to change destination
  839.                                 //---------------------------------------------
  840.                                 // structure type:
  841.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  842.                                 // operations:
  843.                                 //   ACEAdd
  844.                                 //   ACESetComments
  845.                                 //   ACEEncryptFiles
  846.                                 //   ACEAddSFX
  847.                                 //   ACELock
  848.                                 //   ACEAddAV
  849.                                 //   ACEAddRecoveryRecord
  850.                                 //   ACERepair
  851.  
  852.  
  853.    ACE_CALLBACK_ERROR_NOFILES = $22e;
  854.  
  855.                                 // no files specified/could not find files
  856.                                 //---------------------------------------------
  857.                                 // structure type:
  858.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  859.                                 // operations:
  860.                                 //   ACEList
  861.                                 //   ACEDelete
  862.                                 //   ACETest
  863.                                 //   ACEExtract
  864.                                 //   ACEAdd
  865.                                 //   ACESetComments
  866.                                 //   ACEEncryptFiles
  867.  
  868.  
  869.   ACE_CALLBACK_ERROR_ISNOTANARCHIVE = $22f;
  870.  
  871.                                 // specified archive file is not an
  872.                                 // ACE archive
  873.                                 //---------------------------------------------
  874.                                 // structure type:
  875.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  876.                                 // operations:
  877.                                 //   ACEReadArchiveData
  878.                                 //   ACEList
  879.                                 //   ACEDelete
  880.                                 //   ACETest
  881.                                 //   ACEExtract
  882.                                 //   ACEAdd
  883.                                 //   ACERepair
  884.                                 //   ACESetComments
  885.                                 //   ACEEncryptFiles
  886.                                 //   ACEAddSFX
  887.                                 //   ACEAddAV
  888.                                 //   ACELock
  889.                                 //   ACEAddRecoveryRecord
  890.  
  891.  
  892.   ACE_CALLBACK_ERROR_TEMPDIRCREATE = $230;
  893.  
  894.                                 // could not create file in temp directory
  895.                                 // (write protected or directory does
  896.                                 //  not exist)
  897.                                 //---------------------------------------------
  898.                                 // structure type:
  899.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  900.                                 // operations:
  901.                                 //   ACEAdd
  902.                                 //   ACESetComments
  903.                                 //   ACEEncryptFiles
  904.                                 //   ACEAddSFX
  905.                                 //   ACELock
  906.                                 //   ACEAddAV
  907.                                 //   ACEAddRecoveryRecord
  908.                                 //   ACERepair
  909.  
  910.  
  911.   ACE_CALLBACK_ERROR_HIGHERVERSION = $231;
  912.  
  913.                                 // this Dll version is not able to handle
  914.                                 // the archive
  915.                                 //---------------------------------------------
  916.                                 // structure type:
  917.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  918.                                 // operations:
  919.                                 //   ACEAdd
  920.                                 //   ACESetComments
  921.                                 //   ACEEncryptFiles
  922.                                 //   ACEAddSFX
  923.                                 //   ACELock
  924.                                 //   ACEAddAV
  925.                                 //   ACEAddRecoveryRecord
  926.  
  927.  
  928.   ACE_CALLBACK_ERROR_CREATIONNAMEINUSE = $240;
  929.  
  930.                                 // name used by directory
  931.                                 //---------------------------------------------
  932.                                 // structure type:
  933.                                 //   ACE_CALLBACK_TYPE_ARCHIVEDFILE
  934.                                 // operations:
  935.                                 //   ACEExtract
  936.  
  937.  
  938.   ACE_CALLBACK_ERROR_ENCRYPTIONCRC = $242;
  939.  
  940.                                 // encryption failed because of CRC-Error at
  941.                                 // decompression
  942.                                 //---------------------------------------------
  943.                                 // structure type:
  944.                                 //   ACE_CALLBACK_TYPE_ARCHIVEDFILE
  945.                                 // operations:
  946.                                 //   ACEEncryptFiles
  947.  
  948.  
  949.   ACE_CALLBACK_ERROR_READ = $243;
  950.  
  951.                                 // error reading file to be added
  952.                                 // (source disk removed?)
  953.                                 //---------------------------------------------
  954.                                 // structure type:
  955.                                 //   ACE_CALLBACK_TYPE_ARCHIVEDFILE
  956.                                 // operations:
  957.                                 //   ACEAdd
  958.  
  959.  
  960.   ACE_CALLBACK_ERROR_WRITE = $244;
  961.  
  962.                                 // error at extraction
  963.                                 // (destination disk removed?)
  964.                                 //---------------------------------------------
  965.                                 // structure type:
  966.                                 //   ACE_CALLBACK_TYPE_ARCHIVEDFILE
  967.                                 // operations:
  968.                                 //   ACEExtract
  969.  
  970.  
  971.   ACE_CALLBACK_ERROR_OPENREAD = $245;
  972.  
  973.                                 // error opening file for reading
  974.                                 //---------------------------------------------
  975.                                 // structure type:
  976.                                 //   ACE_CALLBACK_TYPE_ARCHIVEDFILE
  977.                                 // operations:
  978.                                 //   ACEAdd
  979.  
  980.  
  981.   ACE_CALLBACK_ERROR_OPENWRITE = $246;
  982.  
  983.                                 // error opening file for writing
  984.                                 //---------------------------------------------
  985.                                 // structure type:
  986.                                 //   ACE_CALLBACK_TYPE_ARCHIVEDFILE
  987.                                 // operations:
  988.                                 //   ACEExtract
  989.  
  990.  
  991.   ACE_CALLBACK_ERROR_FILENAMETOOLONG = $247;
  992.  
  993.                                 // resulting file name too long
  994.                                 //---------------------------------------------
  995.                                 // structure type:
  996.                                 //   ACE_CALLBACK_TYPE_ARCHIVEDFILE
  997.                                 // operations:
  998.                                 //   ACEAdd
  999.  
  1000.  
  1001.   ACE_CALLBACK_ERROR_REPACKCRC = $248;
  1002.  
  1003.                                 // CRC-check error at recompression
  1004.                                 // (archive broken or wrong password)
  1005.                                 //---------------------------------------------
  1006.                                 // structure type:
  1007.                                 //   ACE_CALLBACK_TYPE_ARCHIVEDFILE
  1008.                                 // operations:
  1009.                                 //   ACEDelete
  1010.                                 //   ACEAdd
  1011.  
  1012.  
  1013.   ACE_CALLBACK_ERROR_EXCLUDEPATH = $249;
  1014.  
  1015.                                 // could not exclude path of file names; two
  1016.                                 // or more files would have the same name
  1017.                                 //---------------------------------------------
  1018.                                 // structure type:
  1019.                                 //   ACE_CALLBACK_TYPE_ARCHIVEDFILE
  1020.                                 // operations:
  1021.                                 //   ACEAdd
  1022.  
  1023.  
  1024.   ACE_CALLBACK_ERROR_METHOD = $24a;
  1025.  
  1026.                                 // compression method not known to this
  1027.                                 // Dll version
  1028.                                 //---------------------------------------------
  1029.                                 // structure type:
  1030.                                 //   ACE_CALLBACK_TYPE_ARCHIVEDFILE
  1031.                                 // operations:
  1032.                                 //   ACEDelete
  1033.                                 //   ACETest
  1034.                                 //   ACEExtract
  1035.                                 //   ACEAdd
  1036.                                 //   ACEEncryptFiles
  1037.  
  1038.  
  1039.   ACE_CALLBACK_ERROR_EXTRACTSPACE = $24b;
  1040.  
  1041.                                 // not enough space to extract file
  1042.                                 //---------------------------------------------
  1043.                                 // structure type:
  1044.                                 //   ACE_CALLBACK_TYPE_ARCHIVEDFILE
  1045.                                 // operations:
  1046.                                 //   ACEExtract
  1047.  
  1048.  
  1049.   ACE_CALLBACK_ERROR_CREATION = $24c;
  1050.  
  1051.                                 // creation failed (write-protection?)
  1052.                                 //---------------------------------------------
  1053.                                 // structure type:
  1054.                                 //   ACE_CALLBACK_TYPE_ARCHIVEDFILE
  1055.                                 // operations:
  1056.                                 //   ACEExtract
  1057.  
  1058.  
  1059.   ACE_CALLBACK_ERROR_OVERWRITEDELETE = $24d;
  1060.  
  1061.                                 // could not overwrite because deletion of
  1062.                                 // file failed
  1063.                                 //---------------------------------------------
  1064.                                 // structure type:
  1065.                                 //   ACE_CALLBACK_TYPE_ARCHIVEDFILE
  1066.                                 // operations:
  1067.                                 //   ACEExtract
  1068.  
  1069.  
  1070.   ACE_CALLBACK_ERROR_MOVEDELETE = $260;
  1071.  
  1072.                                 // deletion of file or directory failed
  1073.                                 // (move operation)
  1074.                                 //---------------------------------------------
  1075.                                 // structure type:
  1076.                                 //   ACE_CALLBACK_TYPE_REALFILE
  1077.                                 // operations:
  1078.                                 //   ACEAdd
  1079.  
  1080.   ACE_CALLBACK_ERROR_TEMPDIRSPACE = $270;
  1081.  
  1082.                                 // not enough space at current temp directory
  1083.                                 //---------------------------------------------
  1084.                                 // structure type:
  1085.                                 //   ACE_CALLBACK_TYPE_SPACE
  1086.                                 // operations:
  1087.                                 //   ACEAdd
  1088.                                 //   ACESetComments
  1089.                                 //   ACEEncryptFiles
  1090.                                 //   ACEAddSFX
  1091.                                 //   ACEAddAV
  1092.  
  1093.  
  1094.   ACE_CALLBACK_ERROR_ARCHIVESPACE = $271;
  1095.  
  1096.                                 // not enough space to save archive
  1097.                                 //---------------------------------------------
  1098.                                 // structure type:
  1099.                                 //   ACE_CALLBACK_TYPE_SPACE
  1100.                                 // operations:
  1101.                                 //   ACEDelete
  1102.                                 //   ACEAdd
  1103.                                 //   ACESetComments
  1104.                                 //   ACEEncryptFiles
  1105.                                 //   ACEAddSFX
  1106.                                 //   ACELock
  1107.                                 //   ACEAddAV
  1108.                                 //   ACEAddRecoveryRecord
  1109.                                 //   ACERepair
  1110.  
  1111.  
  1112.   ACE_CALLBACK_ERROR_READINGSFXFILE = $280;
  1113.  
  1114.                                 // error reading SFX file:
  1115.                                 // is no SFX file,
  1116.                                 // file does not exist or could not be opened
  1117.                                 // for reading
  1118.                                 //---------------------------------------------
  1119.                                 // structure type:
  1120.                                 //   ACE_CALLBACK_TYPE_SFXFILE
  1121.                                 // operations:
  1122.                                 //   ACEAdd
  1123.                                 //   ACEAddSFX
  1124.  
  1125.  
  1126.  
  1127.   ACE_CALLBACK_REQUEST_REGISTER = $300;
  1128.  
  1129.                                 // Global.UserAV has to be set
  1130.                                 // to continue registration process;
  1131.                                 // not used in ACL
  1132.                                 //---------------------------------------------
  1133.                                 // structure type:
  1134.                                 //   ACE_CALLBACK_TYPE_GLOBAL
  1135.                                 // operations:
  1136.                                 //   ACERegister
  1137.  
  1138.  
  1139.   ACE_CALLBACK_REQUEST_MARKASSOLID = $320;
  1140.  
  1141.                                 // ArchiveHeader damaged,
  1142.                                 // set solid flag for the new archive?
  1143.                                 // (in case of doubt return yes!)
  1144.                                 //---------------------------------------------
  1145.                                 // structure type:
  1146.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  1147.                                 // operations:
  1148.                                 //   ACERepair
  1149.  
  1150.  
  1151.   ACE_CALLBACK_REQUEST_CHANGEVOLUME = $321;
  1152.                                 // Asks for permission to process next volume.
  1153.                                 // If operation is ACE_CALLBACK_OPERATION_ADD
  1154.                                 // then a new volume will be created.
  1155.                                 // The application may change the name
  1156.                                 // of the archive by modifying
  1157.                                 // ArchiveData->ArchiveName
  1158.                                 //---------------------------------------------
  1159.                                 // structure type:
  1160.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  1161.                                 // operations:
  1162.                                 //   ACEDelete
  1163.                                 //   ACEAdd
  1164.                                 //   ACESetComments
  1165.                                 //   ACEEncryptFiles
  1166.                                 //   ACEList
  1167.                                 //   ACETest
  1168.                                 //   ACEExtract
  1169.  
  1170.  
  1171.   ACE_CALLBACK_REQUEST_ARCHIVEEXISTS = $322;
  1172.                                 // Asks whether to overwrite a file with
  1173.                                 // the same name as the archive.
  1174.                                 //---------------------------------------------
  1175.                                 // structure type:
  1176.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  1177.                                 // operations:
  1178.                                 //   ACEDelete
  1179.                                 //   ACEAdd
  1180.                                 //   ACESetComments
  1181.                                 //   ACEEncryptFiles
  1182.  
  1183.  
  1184.   ACE_CALLBACK_REQUEST_OVERWRITE = $340;
  1185.  
  1186.                                 // Overwrite existing file?
  1187.                                 //---------------------------------------------
  1188.                                 // structure type:
  1189.                                 //   ACE_CALLBACK_TYPE_ARCHIVEDFILE
  1190.                                 // operations:
  1191.                                 //   ACEAdd
  1192.                                 //   ACEExtract
  1193.  
  1194.  
  1195.   ACE_CALLBACK_REQUEST_DELARCHIVEDSYSFILE = $341;
  1196.  
  1197.                                 // Delete rdonly/hidden/system file
  1198.                                 //---------------------------------------------
  1199.                                 // structure type:
  1200.                                 //   ACE_CALLBACK_TYPE_ARCHIVEDFILE
  1201.                                 // operations:
  1202.                                 //   ACEDelete
  1203.  
  1204.  
  1205.   ACE_CALLBACK_REQUEST_ADDBROKENFILE = $342;
  1206.  
  1207.                                 // repair function found file with
  1208.                                 // broken header, add file?
  1209.                                 //---------------------------------------------
  1210.                                 // structure type:
  1211.                                 //   ACE_CALLBACK_TYPE_ARCHIVEDFILE
  1212.                                 // operations:
  1213.                                 //   ACERepair
  1214.  
  1215.  
  1216.   ACE_CALLBACK_REQUEST_PASSWORD =  $343;
  1217.  
  1218.                                 // password required; attention: may be
  1219.                                 // decryption _and_ encryption; but  passwords
  1220.                                 // can be different --> better changing
  1221.                                 // passwords at StateCallbackProc
  1222.                                 //---------------------------------------------
  1223.                                 // structure type:
  1224.                                 //   ACE_CALLBACK_TYPE_ARCHIVEDFILE
  1225.                                 // operations:
  1226.                                 //   ACEDelete
  1227.                                 //   ACETest
  1228.                                 //   ACEExtract
  1229.                                 //   ACEAdd
  1230.                                 //   ACEEncryptFiles
  1231.  
  1232.  
  1233.   ACE_CALLBACK_REQUEST_OVERWRITESYSFILE =  $344;
  1234.  
  1235.                                 // Overwrite rdonly/hidden/system file
  1236.                                 //---------------------------------------------
  1237.                                 // structure type:
  1238.                                 //   ACE_CALLBACK_TYPE_ARCHIVEDFILE
  1239.                                 // operations:
  1240.                                 //   ACEAdd
  1241.                                 //   ACEExtract
  1242.  
  1243.  
  1244.   ACE_CALLBACK_REQUEST_MOVEDELREALSYSFILE =  $360;
  1245.  
  1246.                                 // Delete rdonly/hidden/system file
  1247.                                 // (move to archive operation)
  1248.                                 //---------------------------------------------
  1249.                                 // structure type:
  1250.                                 //   ACE_CALLBACK_TYPE_REALFILE
  1251.                                 // operations:
  1252.                                 //   ACEAdd
  1253.  
  1254.  
  1255.  
  1256.  
  1257.   ACE_CALLBACK_STATE_STARTARCHIVE =  $400;
  1258.  
  1259.                                 // procession of archive is about to begin
  1260.                                 //---------------------------------------------
  1261.                                 // structure type:
  1262.                                 //   ACE_CALLBACK_TYPE_ARCHIVE
  1263.                                 // operations:
  1264.                                 //   ACEList
  1265.                                 //   ACEDelete
  1266.                                 //   ACETest
  1267.                                 //   ACEExtract
  1268.                                 //   ACEAdd
  1269.                                 //   ACERepair
  1270.                                 //   ACESetComments
  1271.                                 //   ACEEncryptFiles
  1272.                                 //   ACEAddSFX
  1273.                                 //   ACEAddAV
  1274.                                 //   ACELock
  1275.                                 //   ACEAddRecoveryRecord
  1276.  
  1277.  
  1278.   ACE_CALLBACK_STATE_STARTFILE =  $410;
  1279.  
  1280.                                 // procession of file is about to begin
  1281.                                 //---------------------------------------------
  1282.                                 // structure type:
  1283.                                 //   ACE_CALLBACK_TYPE_ARCHIVEDFILE
  1284.                                 // operations:
  1285.                                 //   ACEList
  1286.                                 //   ACEDelete
  1287.                                 //   ACETest
  1288.                                 //   ACEExtract
  1289.                                 //   ACEAdd
  1290.                                 //   ACERepair
  1291.                                 //   ACESetComments
  1292.                                 //   ACEEncryptFiles
  1293.  
  1294.  
  1295.   ACE_CALLBACK_STATE_ENDNOCRCCHECK =  $411;
  1296.  
  1297.                                 // end of file procession
  1298.                                 // (no CRC chceck for this operation)
  1299.                                 //---------------------------------------------
  1300.                                 // structure type:
  1301.                                 //   ACE_CALLBACK_TYPE_ARCHIVEDFILE
  1302.                                 // operations:
  1303.                                 //   ACEList
  1304.                                 //   ACEDelete
  1305.                                 //   ACEAdd
  1306.                                 //   ACERepair
  1307.                                 //   ACESetComments
  1308.                                 //   ACEEncryptFiles
  1309.  
  1310.  
  1311.   ACE_CALLBACK_STATE_PROGRESS =  $420;
  1312.  
  1313.                                 // informs about the progress of a file
  1314.                                 // operation
  1315.                                 //---------------------------------------------
  1316.                                 // structure type:
  1317.                                 //   ACE_CALLBACK_TYPE_PROGRESS
  1318.                                 // operations:
  1319.                                 //   ACEDelete
  1320.                                 //   ACETest
  1321.                                 //   ACEExtract
  1322.                                 //   ACEAdd
  1323.                                 //   ACERepair
  1324.                                 //   ACEEncryptFiles
  1325.  
  1326.  
  1327.   ACE_CALLBACK_STATE_ENDCRCCHECK =  $430;
  1328.  
  1329.                                 // end of file procession, CRC-check
  1330.                                 // result is passed
  1331.                                 //---------------------------------------------
  1332.                                 // structure type:
  1333.                                 //   ACE_CALLBACK_TYPE_CRCCHECK
  1334.                                 // operations:
  1335.                                 //   ACETest
  1336.                                 //   ACEExtract
  1337.                                 //   ACEDelete
  1338.                                 //   ACEAdd
  1339.  
  1340.  
  1341.  
  1342. ////////////////////////////////////////////////////////////////////////
  1343. //             PART 3.1: ACE.DLL FUNCTION RETURN CODES
  1344. ////////////////////////////////////////////////////////////////////////
  1345.  
  1346. // These error codes are returned by the ACE.DLL-functions. The meanings
  1347. // of the codes are the same, as they are for the exit codes of ACE.EXE.
  1348.  
  1349.   ACE_ERROR_NOERROR   =    0;   // no error; operation succesful
  1350.   ACE_ERROR_MEM       =    1;    // insufficient memory
  1351.   ACE_ERROR_FILES     =    2;    // no files specified
  1352.   ACE_ERROR_FOUND     =    3;    // specified archive not found
  1353.   ACE_ERROR_FULL      =    4;    // disk full
  1354.   ACE_ERROR_OPEN      =    5;    // could not open file
  1355.   ACE_ERROR_READ      =    6;    // read error
  1356.   ACE_ERROR_WRITE     =    7;    // write error
  1357.   ACE_ERROR_CLINE     =    8;    // invalid command line
  1358.   ACE_ERROR_CRC       =    9;    // CRC error
  1359.   ACE_ERROR_OTHER     =   10;    // other error
  1360.   ACE_ERROR_EXISTS    =   11;    // file already exists
  1361.   ACE_ERROR_USER      =  255;    // user break (application
  1362.                                  // returned cancel code at
  1363.                                  // callback function)
  1364.  
  1365. // These error codes are returned by the ACE.DLL-functions. They are not
  1366. // used by ACE.EXE yet.
  1367.  
  1368.   ACE_ERROR_PARAM     =  128;    // might be used later
  1369.  
  1370.  
  1371. ////////////////////////////////////////////////////////////////////////
  1372. //                     PART 1: DIFFERENT STRUCTURES
  1373. ////////////////////////////////////////////////////////////////////////
  1374. //
  1375. // Here in different structures used at callback functions and
  1376. // ACE.DLL functions are declared.
  1377. //
  1378. // Contents:
  1379. //   Part 1.1: structures used in callback structures
  1380. //   Part 1.2: structures used in function structures
  1381. //
  1382. ////////////////////////////////////////////////////////////////////////
  1383.  
  1384.  
  1385. ////////////////////////////////////////////////////////////////////////
  1386. //             Part 1.1: structures used in callback structures
  1387. ////////////////////////////////////////////////////////////////////////
  1388. // comment buffer structure
  1389. // Used in tACEGlobalDataStruc. Application has to specify where the
  1390. // comment is or should be stored.
  1391.  
  1392. type
  1393.   tACECommentStruc = packed record
  1394.     Buf                  : PByteArray;
  1395.     Bufsize              : integer;
  1396.     State                : integer;
  1397.   end;
  1398.   pACECommentStruc = ^tACECommentStruc;
  1399.  
  1400. // Global data structure
  1401. // This structure contains information for the Dll being interesting for
  1402. // nearly all functions. The Dll has to be initialized with this
  1403. // structure passed to tACEInitDll(). This structure is also passed
  1404. // by the callback functions.
  1405.  
  1406.  
  1407.   tACEGlobalDataStruc = packed record
  1408.     Obj                 : Pointer;
  1409.                                  // ---- reserved for application! ----
  1410.                                  // thought to be used as a pointer to
  1411.                                  // an object; when a callback-function is
  1412.                                  // called, the object pointer can be used to
  1413.                                  // handle the callback in a specific way;
  1414.                                  // the pointer has to be initialized by
  1415.                                  // ACEInitDll()
  1416.  
  1417.     MaxArchiveTestBytes : ulong; // how many bytes of a file should be
  1418.                                  // looked upon at archive header search?
  1419.  
  1420.     MaxFileBufSize      : ulong; // maximum buffer size for buffered
  1421.                                  // I/O operations
  1422.  
  1423.     Comment             : tACECommentStruc;
  1424.                                  // used to exchange comment data
  1425.                                  // between application and Dll
  1426.                                  // using callback functions
  1427.  
  1428.     DecryptPassword     : PChar; // the DecryptPassword specified at
  1429.                                  // ACEInitDll() is overwritten by the
  1430.                                  // DecryptPassword field of tACEAddStruc and
  1431.                                  // other function-specific structures;
  1432.                                  // but this field can be used to change the
  1433.                                  // password at callback function calls
  1434.     Reserved1           : array[0..63] of char;
  1435.  
  1436.  
  1437. // fields for ACE only
  1438.     EncryptPassword     : PChar; // things stated at the description of the
  1439.                                  // DecryptPassword field apply here as well
  1440.  
  1441.     TempDir             : PChar; // directory to save temporary archive
  1442.  
  1443. // registration (ACE DLLs only, but not used at ACL)
  1444.  
  1445.     KeyPath             : PChar; // necessary for reading and writing key file
  1446.  
  1447.     UserAV              : PChar; // Dll returns the AV string (if registered)
  1448.                                  // in this field
  1449.  
  1450.     IsGeneralKey        : PChar; // DLL returns the key, if it is a general key
  1451.  
  1452.     OwnerWindow         : HWND ; // specifies the applications window to be
  1453.                                  // parent of the registration reminder dialog
  1454.  
  1455. // fields for ACE only
  1456.  
  1457.     CompressionLevel    : ulong; // contains the currently used compression
  1458.                                  // level - may be changed during compression
  1459.                                  // operation
  1460.  
  1461.     Reserved2           : array[0..55] of char;
  1462.                                  // has to be filled with zeros
  1463.  
  1464.                                  // Callback routine addresses
  1465.     InfoCallbackProc    : Pointer;
  1466.     ErrorCallbackProc   : Pointer;
  1467.     RequestCallbackProc : Pointer;
  1468.     StateCallbackProc   : Pointer;
  1469.  
  1470. // different new fields
  1471.     Reserved3           : array[0..63] of char;  // has to be filled with zeros
  1472.   end;
  1473.   pACEGlobalDataStruc = ^tACEGlobalDataStruc;
  1474.  
  1475. ////////////////////////////////////////////////////////////////////////
  1476. //  archive data structure
  1477. // Informs the callback functions about the current archive, its volume
  1478. // number, the archive-flags (see ACE_FLAG constants), the creation host
  1479. // system (see ACE_HOST constants) and the AV if present in archive.
  1480. // Also used at ACEReadArchiveData().
  1481.  
  1482.   tACEArchiveDataStruc = packed record
  1483.    ArchiveName   : PChar;
  1484.    VolumeNumber,
  1485.    Flags,          // see ACE_ARCFLAG defines below
  1486.    HostCreated,    // see ACE_HOST defines below
  1487.    TimeCreated,    // in MS-DOS format
  1488.    VersionCreated,
  1489.    VersionExtract: ulong; // version needed to extract files
  1490.    AV            : PChar;  // not used in ACL
  1491.    Reserved      : array[0..63] of char;  // filled with zeros
  1492.   end;
  1493.   pACEArchiveDataStruc = ^tACEArchiveDataStruc;
  1494.  
  1495. ////////////////////////////////////////////////////////////////////////
  1496. // Contains information about an archived file.
  1497.  
  1498.   tACEFileDataStruc = packed record
  1499.      SourceFileName        : PChar;   // relative file name
  1500.      DestinationFileName   : PCHAR;   // absolute file name;
  1501.                                       // valid for add and extract only!
  1502.      Flags,                           // see ACE_FILEFLAG defines below
  1503.      CRC32,
  1504.      Method,                          // 0=stored, 1=LZ77, 2=V20Compression
  1505.      Dictionary                       // DictionarySize = 2^Dictionary
  1506.                             : ulong;
  1507.  
  1508.      CompressedSize,
  1509.      Size                   : Int64;
  1510.      Time,
  1511.      Attributes             : ulong;
  1512.  
  1513.      Reserved                : array[0..63] of char;
  1514.                                       // filled with zeros
  1515.   end;
  1516.   pACEFileDataStruc = ^tACEFileDataStruc;
  1517.  
  1518. ////////////////////////////////////////////////////////////////////////
  1519. // Is passed to ACEInfoCallbackProc with ACE_CALLBACK_INFO_COPY as code.
  1520. // Informs application about the progress of copying either an archive to
  1521. // a temporary archive, or a temporary archive back to a normal archive.
  1522.  
  1523.   tACECopyInfoStruc = packed record
  1524.     SourceFileName         : PChar;  // source file
  1525.     DestinationFileName    : PChar;  // the file copying the source to
  1526.     CopiedBytes,                     // bytes already copied
  1527.     FileSize               : int64;  // source file size
  1528.     Reserved               : array[0..63] of char; // filled with zeros
  1529.   end;
  1530.   pACECopyInfoStruc = ^tACECopyInfoStruc;
  1531.  
  1532. ////////////////////////////////////////////////////////////////////////
  1533. // operation progress structure
  1534. // Used to state the progress of the current operation.
  1535.  
  1536.   tACEProgressDataStruc = packed record
  1537.     Addr                : PChar; // address of uncompressed data block
  1538.     Size                : ulong; // size of uncompressed data block
  1539.     TotalProcessedSize  : int64; // counted by Dll:
  1540.                                  // total uncompressed bytes processed
  1541.     TotalCompressedSize : int64; // total compressed bytes processed
  1542.     TotalSize           : int64; // total uncompressed bytes to process
  1543.                                  // (sum of all original file sizes)
  1544.     FileProcessedSize   : int64; // uncompr. bytes of file processed
  1545.     FileCompressedSize  : int64; // compr. bytes of file processed
  1546.     FileSize            : int64; // uncompressed file size
  1547.   end;
  1548.   pACEProgressDataStruc = ^tACEProgressDataStruc;
  1549.  
  1550.  
  1551. ////////////////////////////////////////////////////////////////////////
  1552. //             Part 1.2: structures used in function structures
  1553. ////////////////////////////////////////////////////////////////////////
  1554.  
  1555. ////////////////////////////////////////////////////////////////////////
  1556. //  file list structure
  1557. // This structure is used in the function specific structures.
  1558. // The application has to use this structure to indicate which files
  1559. // have to be processed by the DLL.
  1560.  
  1561.   tACEFilesStruc = packed record
  1562.     SourceDir      : PChar;      // maybe a real or an archive directory
  1563.     FileList       : PChar;      // pointer to list of files to process;
  1564.                                  // zero-terminated; files have to be
  1565.                                  // separated by carriage-return (0xd);
  1566.                                  // FileList may/will be modified by the
  1567.                                  // Dll; if nothing is specified, "*"
  1568.                                  // will be used
  1569.                                  // (attention at ACEDelete!!)
  1570.      ExcludeList   : PChar;      // list of files to exclude from process
  1571.      FullMatch     : LongBool;   // specifications must fully match
  1572.                                  // (no files with the same name in
  1573.                                              //  subdirs are processed)
  1574.      RecurseSubDirs: LongBool;   // recurse subdirectories
  1575.                                           // (valid for add operations only)
  1576.      Reserved      : array[0..59] of char;
  1577.                                  // has to be filled with zeros
  1578.                                  // for future: possibly in-/excluding
  1579.                                  // file attributes and date/time range
  1580.   end;
  1581.   pACEFilesStruc = ^tACEFilesStruc;
  1582.  
  1583. ////////////////////////////////////////////////////////////////////////
  1584. // V2.0 compression structure
  1585. // Specifies whether to use v2.0 compression or not. If you use v2.0
  1586. // compression you can also specify which v2.0 compression techniques
  1587. // you want to use. (ACE only)
  1588.  
  1589.   tACEV20CompressionStruc = packed record
  1590.     DoUse,                // if DoUse=1 and all other fields are
  1591.     DoUseDelta,           // zero, then all v2.0 compression
  1592.     DoUseExe,             // techniques will be used
  1593.     DoUsePic,
  1594.     DoUseSound  : LongBool;
  1595.     Reserved    : array[0..63] of char; // has to be filled with zeros
  1596.  
  1597.   end;
  1598.  
  1599. ////////////////////////////////////////////////////////////////////////
  1600. //  compression parameter structure
  1601. // Used in tACEAddStruc and tACEDeleteStruc. (ACE only)
  1602.  
  1603. //        typedef struct sACECompressParamsStruc
  1604.   tACECompressParamsStruc = packed record
  1605.     Level,                      // see ACE_LEVEL constants below
  1606.     Dictionary      : ulong;    // 15(32k)..22(4Mb)
  1607.  
  1608.     V20Compression  : tACEV20CompressionStruc;
  1609.                                 // indicates if (or which) v2.0
  1610.                                 // compression techniques shall be used
  1611.  
  1612.     TestAfter       : LongBool; // make a test for CRC check errors
  1613.                                 // after compression
  1614.     Reserved        : array[0..63] of char; // has to be filled with zeros
  1615.   end;
  1616.  
  1617. ////////////////////////////////////////////////////////////////////////
  1618. //             PART 2: ACE.DLL CALLBACK DECLARATIONS
  1619. ////////////////////////////////////////////////////////////////////////
  1620. //
  1621. // ACE.DLL makes use of four callback functions to exchange data
  1622. // with the application:
  1623. //
  1624. //   1) InfoCallbackProc   (pACEInfoCallbackProcStruc    Info)
  1625. //   2) ErrorCallbackProc  (pACEErrorCallbackProcStruc   Error)
  1626. //   3) RequestCallbackProc(pACERequestCallbackProcStruc Request)
  1627. //   4) StateCallbackProc  (pACEStateCallbackProcStruc   State)
  1628. //
  1629. // Meaning of different callback types:
  1630. //   Info    - lets the application know about actions that take some
  1631. //             time but are not essential
  1632. //             (Code is one of ACE_CALLBACK_INFO constants)
  1633. //   Error   - an error occured; if the reason for this error can
  1634. //             be solved by the application then the Dll can continue
  1635. //             the current operation, otherwise the operation has to
  1636. //             be canceled
  1637. //             (Code is one of ACE_CALLBACK_ERROR constants)
  1638. //   Request - the Dll needs some user input
  1639. //             for ex.: "Overwrite file? (yes/no/cancel)"
  1640. //             (Code is one of ACE_CALLBACK_REQUEST constants)
  1641. //   State   - Dll informs application about the progress of an operation
  1642. //             (Code is one of ACE_CALLBACK_STATE constants)
  1643. //
  1644. // The pointers to the callback functions has to be set by the application
  1645. // when calling ACEInitDll(). If the application does not install
  1646. // a callback function, is has set the corresponding pointer to NULL.
  1647. // If the ACE.DLL has to call the Error or Request callback function
  1648. // and they are not installed, the ACE.DLL will cancel the operation.
  1649. //
  1650. // The application has the possibility to cancel the current operation
  1651. // at each callback function call. So if the user clicks on a Cancel-button,
  1652. // the application should return ACE_CALLBACK_RETURN_CANCEL at the next
  1653. // callback function call.
  1654. //
  1655. // All callback function parameters are declared as unions.
  1656. // The StructureType field contains he type of the structure which is used.
  1657. // When the application knows which type of structure it has to use,
  1658.  // it will have to interpret the Code field to get to know the reason
  1659. // for the callback function call.
  1660. //
  1661. // Contents:
  1662. //   Part 2.1: operation types
  1663. //   Part 2.2: callback function return codes
  1664. //   Part 2.3: callback structure types
  1665. //   Part 2.4: callback structures
  1666. //   Part 2.5: info callback function
  1667. //   Part 2.6: error callback function
  1668. //   Part 2.7: request callback function
  1669. //   Part 2.8: state callback function
  1670.  
  1671.  
  1672.  
  1673.  
  1674. ////////////////////////////////////////////////////////////////////////
  1675. //                   Part 2.4: different callback structures
  1676. // These are the declarations of the different structures used in the
  1677. // unions passed by the callback functions.
  1678.  
  1679.       //-----------------------------------------------------------------------
  1680.       // Only the Dll GlobalData is passed to the application.
  1681.       //-----------------------------------------------------------------------
  1682.  
  1683.   tACECallbackGlobalStruc = packed record
  1684. //???    StructureType : ulong;         // is ACE_CALLBACK_TYPE_GLOBAL
  1685.     Code          : ulong;         // see definition of
  1686.                                    // ACE_CALLBACK_TYPE_GLOBAL
  1687.     Operation     : ulong;         // ACE_CALLBACK_OPERATION constant
  1688.  
  1689.     GlobalData    : pACEGlobalDataStruc;  // see tACEGlobalDataStruc
  1690.   end;
  1691.   pACECallbackGlobalStruc = ^tACECallbackGlobalStruc;
  1692.  
  1693.  
  1694.       //-----------------------------------------------------------------------
  1695.       // The Dll GlobalData and the ArchiveData are passed.
  1696.       //-----------------------------------------------------------------------
  1697.  
  1698.   tACECallbackArchiveStruc = packed record
  1699. //???    StructureType   : ulong;                    // is ACE_CALLBACK_TYPE_ARCHIVE
  1700.     Code            : ulong;                    // see definition of
  1701.                                                 // ACE_CALLBACK_TYPE_ARCHIVE
  1702.     Operation       : ulong;                    // ACE_CALLBACK_OPERATION constant
  1703.  
  1704.     GlobalData      : pACEGlobalDataStruc;      // see tACEGlobalDataStruc
  1705.     ArchiveData     : pACEArchiveDataStruc;     // see tACEArchiveDataStruc
  1706.   end;
  1707.   pACECallbackArchiveStruc = ^tACECallbackArchiveStruc;
  1708.  
  1709.       //-----------------------------------------------------------------------
  1710.       // GlobalData, ArchiveData and FileData are passed.
  1711.       //-----------------------------------------------------------------------
  1712.  
  1713.   tACECallbackArchivedFileStruc = packed record
  1714. //???    StructureType    : ulong;                  // is ACE_CALLBACK_TYPE_ARCHIVEDFILE
  1715.     Code             : ulong;                  // see definition of
  1716.                                                // ACE_CALLBACK_TYPE_ARCHIVEDFILE
  1717.     Operation        : ulong;                  // ACE_CALLBACK_OPERATION constant
  1718.  
  1719.     GlobalData       : pACEGlobalDataStruc;    // see tACEGlobalDataStruc
  1720.     ArchiveData      : pACEArchiveDataStruc;   // see tACEArchiveDataStruc
  1721.     FileData         : pACEFileDataStruc;      // see tACEFileDataStruc
  1722.   end;
  1723.   pACECallbackArchivedFileStruc = ^tACECallbackArchivedFileStruc;
  1724.  
  1725.  
  1726.       //-----------------------------------------------------------------------
  1727.       // GlobalData, ArchiveData and a FileName are passed.
  1728.       //-----------------------------------------------------------------------
  1729.  
  1730.   tACECallbackRealFileStruc = packed record
  1731. //???    StructureType    : ulong;                  // is ACE_CALLBACK_TYPE_REALFILE
  1732.     Code             : ulong;                  // see definition of
  1733.                                                // ACE_CALLBACK_TYPE_REALFILE
  1734.     Operation        : ulong;                  // ACE_CALLBACK_OPERATION constant
  1735.  
  1736.     GlobalData       : pACEGlobalDataStruc;    // see tACEGlobalDataStruc
  1737.     ArchiveData      : pACEArchiveDataStruc;   // see tACEArchiveDataStruc
  1738.     FileName         : PChar;                  // name of file
  1739.   end;
  1740.   pACECallbackRealFileStruc = ^tACECallbackRealFileStruc;
  1741.  
  1742.       //-----------------------------------------------------------------------
  1743.       // GlobalData, ArchiveData, the path of temp directory and the
  1744.       // bytes required in temp directory (archive size) are passed.
  1745.       //-----------------------------------------------------------------------
  1746.  
  1747.   tACECallbackSpaceStruc = packed record
  1748. //???    StructureType   : ulong;                  // is ACE_CALLBACK_TYPE_SPACE
  1749.     Code            : ulong;                  // see definition of
  1750.                                               // ACE_CALLBACK_TYPE_SPACE
  1751.     Operation       : ulong;
  1752.  
  1753.     GlobalData      : pACEGlobalDataStruc;    // see tACEGlobalDataStruc
  1754.     ArchiveData     : pACEArchiveDataStruc;   // see tACEArchiveDataStruc
  1755.     Directory       : PChar;                  // path of directory
  1756.     ArchiveSize     : int64;                  // bytes required in temp dir
  1757.   end;
  1758.   pACECallbackSpaceStruc = ^tACECallbackSpaceStruc;
  1759.  
  1760.       //-----------------------------------------------------------------------
  1761.       // GlobalData, ArchiveData and SFXFileName are passed.
  1762.       //-----------------------------------------------------------------------
  1763.  
  1764.   tACECallbackSFXFileStruc = packed record
  1765. //???    StructureType  : ulong;                   // is ACE_CALLBACK_TYPE_SFXFILE
  1766.     Code           : ulong;                   // see definition of
  1767.                                               // ACE_CALLBACK_TYPE_SFXFILE
  1768.     Operation      : ulong;                   // ACE_CALLBACK_OPERATION constant
  1769.  
  1770.     GlobalData     : pACEGlobalDataStruc;     // see tACEGlobalDataStruc
  1771.     ArchiveData    : pACEArchiveDataStruc;    // see tACEArchiveDataStruc
  1772.     SFXFileName    : PChar;                   // name of SFX
  1773.   end;
  1774.   pACECallbackSFXFileStruc = ^tACECallbackSFXFileStruc;
  1775.  
  1776.  
  1777.       //-----------------------------------------------------------------------
  1778.       // GlobalData, ArchiveData and CopyData are passed.
  1779.       //-----------------------------------------------------------------------
  1780.  
  1781.   tACECallbackCopyStruc = packed record
  1782. //???    StructureType   : ulong;                 // is ACE_CALLBACK_TYPE_COPY
  1783.     Code            : ulong;                 // see definition of
  1784.                                              // ACE_CALLBACK_TYPE_COPY
  1785.     Operation       : ulong;                 // ACE_CALLBACK_OPERATION constant
  1786.  
  1787.     GlobalData      : pACEGlobalDataStruc;   // see tACEGlobalDataStruc
  1788.     ArchiveData     : pACEArchiveDataStruc;  // see tACEArchiveDataStruc
  1789.     CopyData        : pACECopyInfoStruc;     // see tACECopyInfoStruc
  1790.   end;
  1791.   pACECallbackCopyStruc = ^tACECallbackCopyStruc;
  1792.  
  1793.       //-----------------------------------------------------------------------
  1794.       // GlobalData, ArchiveData, FileData and ProgressData are passed.
  1795.       //-----------------------------------------------------------------------
  1796.  
  1797.   tACECallbackProgressStruc = packed record
  1798. //???    StructureType   : ulong;                 // is ACE_CALLBACK_TYPE_COPY
  1799.     Code            : ulong;                 // see definition of
  1800.                                              // ACE_CALLBACK_TYPE_COPY
  1801.     Operation       : ulong;                 // ACE_CALLBACK_OPERATION constant
  1802.  
  1803.     GlobalData      : pACEGlobalDataStruc;   // see tACEGlobalDataStruc
  1804.     ArchiveData     : pACEArchiveDataStruc;  // see tACEArchiveDataStruc
  1805.  
  1806.     FileData        : pACEFileDataStruc;     // see tACEFileDataStruc
  1807.     ProgressData    : pACEProgressDataStruc; // see tACEProgressDataStruc
  1808.   end;
  1809.   pACECallbackProgressStruc = ^tACECallbackProgressStruc;
  1810.  
  1811.       //-----------------------------------------------------------------------
  1812.       // GlobalData, ArchiveData, FileData and CRC-check result are passed.
  1813.       //-----------------------------------------------------------------------
  1814.  
  1815.   tACECallbackCRCCheckStruc = packed record
  1816. //???    StructureType   : ulong;                 // is ACE_CALLBACK_TYPE_COPY
  1817.     Code            : ulong;                 // see definition of
  1818.                                              // ACE_CALLBACK_TYPE_COPY
  1819.     Operation       : ulong;                 // ACE_CALLBACK_OPERATION constant
  1820.  
  1821.     GlobalData      : pACEGlobalDataStruc;   // see tACEGlobalDataStruc
  1822.     ArchiveData     : pACEArchiveDataStruc;  // see tACEArchiveDataStruc
  1823.  
  1824.     FileData        : pACEFileDataStruc;     // see tACEFileDataStruc
  1825.  
  1826.     CRCOk           : LongBool;              // CRC-check result
  1827.   end;
  1828.   pACECallbackCRCCheckStruc = ^tACECallbackCRCCheckStruc;
  1829.  
  1830.  
  1831. ////////////////////////////////////////////////////////////////////////
  1832. //                Part 2.5: info callback function
  1833. // Declaration of ACEInfoCallbackProc() parameter and explanation of
  1834. // callback info codes.
  1835.  
  1836.       //-----------------------------------------------------------------------
  1837.       // Union parameter used at ACEInfoCallbackProc().
  1838.       //-----------------------------------------------------------------------
  1839.  
  1840.   tACEInfoCallbackProcStruc = packed record
  1841.     case StructureType : ulong of
  1842.       0 : (Global    : tACECallbackGlobalStruc);
  1843.       1 : (Archive   : tACECallbackArchiveStruc);
  1844.       2 : (RealFile  : tACECallbackRealFileStruc);
  1845.       3 : (Copy      : tACECallbackCopyStruc);
  1846.   end;
  1847.   pACEInfoCallbackProcStruc = ^tACEInfoCallbackProcStruc;
  1848.  
  1849.  
  1850.  
  1851.  
  1852.   //═══════════════════════════════════════════════════════════════════════════
  1853.   //=================---  Part 2.6: error callback function  ---===============
  1854.   //═══════════════════════════════════════════════════════════════════════════
  1855.   // Declaration of ACEErrorCallbackProc() parameter and explanation of
  1856.   // callback error codes.
  1857.   //---------------------------------------------------------------------------
  1858.  
  1859.       //-----------------------------------------------------------------------
  1860.       // Union parameter used at ACEErrorCallbackProc().
  1861.       //-----------------------------------------------------------------------
  1862.  
  1863.   tACEErrorCallbackProcStruc = packed record
  1864.     case StructureType : ulong of
  1865.       0 : (Global        : tACECallbackGlobalStruc);
  1866.       1 : (Archive       : tACECallbackArchiveStruc);
  1867.       2 : (ArchivedFile  : tACECallbackArchivedFileStruc);
  1868.       3 : (RealFile      : tACECallbackRealFileStruc);
  1869.       4 : (Space         : tACECallbackSpaceStruc);
  1870.       5 : (SFXFile       : tACECallbackSFXFileStruc);
  1871.   end;
  1872.   pACEErrorCallbackProcStruc = ^tACEErrorCallbackProcStruc;
  1873.  
  1874.       //-----------------------------------------------------------------------
  1875.       // This structure is used by the ACEErrorCallback function to inform
  1876.       // the application about errors. The Code field of the used structure
  1877.       // contains an ACE_CALLBACK_ERROR value. At most problems modifications
  1878.       // to the passed structure can be made to fix it. Other problems can not
  1879.       // be solved and cause an operation abort immediately.
  1880.       // ErrorCallbackProc() has to return either ACE_CALLBACK_RETURN_OK or
  1881.       // ACE_CALLBACK_RETURN_CANCEL.
  1882.       //-----------------------------------------------------------------------
  1883.  
  1884.  
  1885.   //═══════════════════════════════════════════════════════════════════════════
  1886.   //================---  Part 2.7: request callback function  ---==============
  1887.   //═══════════════════════════════════════════════════════════════════════════
  1888.   // Declaration of ACERequestCallbackProc() parameter and explanation of
  1889.   // callback request codes.
  1890.   //---------------------------------------------------------------------------
  1891.  
  1892.       //-----------------------------------------------------------------------
  1893.       // Union parameter used at ACERequestCallbackProc().
  1894.       //-----------------------------------------------------------------------
  1895.  
  1896.  
  1897.   tACERequestCallbackProcStruc = packed record
  1898.     case StructureType : ulong of
  1899.       0 : (Global        : tACECallbackGlobalStruc);
  1900.       1 : (Archive       : tACECallbackArchiveStruc);
  1901.       2 : (ArchivedFile  : tACECallbackArchivedFileStruc);
  1902.       3 : (RealFile      : tACECallbackRealFileStruc);
  1903.   end;
  1904.   pACERequestCallbackProcStruc = ^tACERequestCallbackProcStruc;
  1905.  
  1906.       //-----------------------------------------------------------------------
  1907.       // Question constants are passed to the RequestCallbackProc callback
  1908.       // function to request further data.
  1909.       // RequestCallbackProc may return ACE_CALLBACK_RETURN_OK,
  1910.       // ACE_CALLBACK_RETURN_NO or ACE_CALLBACK_RETURN_CANCEL.
  1911.       //-----------------------------------------------------------------------
  1912.  
  1913.  
  1914.   //═══════════════════════════════════════════════════════════════════════════
  1915.   //=================---  Part 2.8: state callback function  ---===============
  1916.   //═══════════════════════════════════════════════════════════════════════════
  1917.   // Declaration of ACEStateCallbackProc() parameter and explanation of
  1918.   // callback state codes.
  1919.   //---------------------------------------------------------------------------
  1920.  
  1921.       //-----------------------------------------------------------------------
  1922.       // Union parameter used at ACEStateCallbackProc().
  1923.       //-----------------------------------------------------------------------
  1924.  
  1925.   tACEStateCallbackProcStruc = packed record
  1926.     case StructureType : ulong of
  1927.       0 : (Archive       : tACECallbackArchiveStruc);
  1928.       1 : (ArchivedFile  : tACECallbackArchivedFileStruc);
  1929.       2 : (RealFile      : tACECallbackArchivedFileStruc);
  1930.       3 : (Progress      : tACECallbackProgressStruc);
  1931.       4 : (CRCCheck      : tACECallbackCRCCheckStruc);
  1932.   end;
  1933.   pACEStateCallbackProcStruc = ^tACEStateCallbackProcStruc;
  1934.  
  1935.       //-----------------------------------------------------------------------
  1936.       // Calls to (*StateCallbackProc)() with ACE_CALLBACK_STATE values in the
  1937.       // Code field are made to enable the application to show the progress of
  1938.       // an operation.
  1939.       //-----------------------------------------------------------------------
  1940.  
  1941.  
  1942. ////////////////////////////////////////////////////////////////////////
  1943. //             Part 3.2: functions and parameter structures
  1944. ////////////////////////////////////////////////////////////////////////
  1945.  
  1946. ////////////////////////////////////////////////////////////////////////
  1947. // ACEInitDll
  1948. // Initializes ACE dynamic link library. Has to be called before any
  1949. // other function call. May be called more than one time.
  1950.  
  1951. // ACEInitDll() parameter structure.
  1952.  
  1953.   tACEInitDllStruc = packed record
  1954.     GlobalData : tACEGlobalDataStruc;
  1955.     Reserved   : array[0..63] of char; // has to be filled with zeroes
  1956.   end;
  1957.   pACEInitDllStruc = ^tACEInitDllStruc;
  1958.  
  1959. // ACEInitDll() function declaration.
  1960.   TACEInitDllProc = function(DllDate : pACEInitDllStruc) : integer; stdcall;
  1961.  
  1962.  
  1963. ////////////////////////////////////////////////////////////////////////
  1964. // ACEReadArchiveData
  1965. // Tests a file whether it is an archive or not and reads out the archive
  1966. // data.
  1967.  
  1968. // ACEReadArchiveData() parameter structure.
  1969.  
  1970.   tACEReadArchiveDataStruc = packed record
  1971.     ArchiveData : tACEArchiveDataStruc;   // if this pointer is NULL, the
  1972.                                           // file passed to ACEReadArchiveData
  1973.                                           // is no archive; otherwise it points
  1974.                                           // to a tACEArchiveDataStruc structure
  1975.                                           // that contains information about the
  1976.                                           // archive
  1977.     Reserved    : array[0..63] of char;   // has to be filled with zeroes
  1978.   end;
  1979.   pACEReadArchiveDataStruc = ^tACEReadArchiveDataStruc;
  1980.  
  1981.  
  1982. // ACEReadArchiveData() function declaration.
  1983.   TACEReadArchiveDataProc = function(ArchiveName : PChar;
  1984.                                      ArchiveData : pACEReadArchiveDataStruc) : integer; stdcall;
  1985.  
  1986. ////////////////////////////////////////////////////////////////////////
  1987. //  ACEList
  1988. // Passes the specified files in the archive to StateCallbackProc().
  1989.  
  1990. // ACEList() parameter structure.
  1991.  
  1992.   tACEListStruc = packed record
  1993.     Files : tACEFilesStruc;           // specifies files to be listed;
  1994.                                       // see tACEFilesStruc structure
  1995.     Reserved : array[0..63] of char;  // has to be filled with zeroes
  1996.   end;
  1997.   pACEListStruc = ^tACEListStruc;
  1998.  
  1999. // ACEList() function declaration.
  2000.   TACEListProc = function(ArchiveName : PChar;
  2001.                           List        : pACEListStruc) : integer; stdcall;
  2002.  
  2003.  
  2004. ////////////////////////////////////////////////////////////////////////
  2005. // ACETest
  2006. // Tests specified files in archive.
  2007.  
  2008. // ACETest() parameter structure.
  2009.   tACETestStruc = packed record
  2010.     Files : tACEFilesStruc;           // specifies files to test;
  2011.                                       // see tACEFilesStruc structure
  2012.     DecryptPassword : PChar;          // zero-terminated string,
  2013.                                       // case-sensitive (maxlen=56)
  2014.     Reserved : array[0..63] of char;  // has to be filled with zeroes
  2015.   end;
  2016.   pACETestStruc = ^tACETestStruc;
  2017.  
  2018. // ACETest() function declaration.
  2019.   TACETestProc = function(ArchiveName : PChar;
  2020.                           List        : pACETestStruc) : integer; stdcall;
  2021.  
  2022. ////////////////////////////////////////////////////////////////////////
  2023. // ACEExtract
  2024. // Extracts specified  files.
  2025.  
  2026. // ACEExtract() parameter structure.
  2027.   tACEExtractStruc = packed record
  2028.     Files : tACEFilesStruc;           // specifies files to extract;
  2029.                                       // see tACEFilesStruc structure
  2030.     DestinationDir : PChar;           // directory to extract files to
  2031.     ExcludePath : LongBool;           // extract files without path
  2032.       DecryptPassword : PChar;        // password for decryption (if files
  2033.                                       // are encrypted);
  2034.                                       // zero-terminated string,
  2035.                                       // case-sensitive (maxlen=56)
  2036.     Reserved : array[0..63] of char;  // has to be filled with zeroes
  2037.   end;
  2038.   pACEExtractStruc = ^tACEExtractStruc;
  2039.  
  2040. // ACEExtract() function declaration.
  2041.   TACEExtractProc = function(ArchiveName : PChar;
  2042.                              Extract     : pACEExtractStruc) : integer; stdcall;
  2043.  
  2044.  
  2045. const
  2046.   FILELISTSIZE   = 32768;   // pretty much for this this example:
  2047.                             // only the commandline can be used to
  2048.                             // specify files..
  2049.   COMMENTBUFSIZE =  8192;   // comments may be up to 32k in size
  2050.                             // increase it if you want to put that
  2051.                             // large comments to archives, or if
  2052.                             // you want to receive all of these large
  2053.                             // comments (ACE_COMMENT_SMALLBUF returned
  2054.                             // if comment does not fit into buffer)
  2055.  
  2056.  
  2057. var
  2058.   AceDllInstance     : THandle;
  2059.  
  2060.   FileList           : array[0..FILELISTSIZE-1] of char;
  2061.   CommentBuf         : array[0..COMMENTBUFSIZE-1] of char;
  2062.  
  2063.   ACEInitDll         : TACEInitDllProc;
  2064.   ACEReadArchiveData : TACEReadArchiveDataProc;
  2065.   ACEList            : TACEListProc;
  2066.   ACETest            : TACETestProc;
  2067.   ACEExtract         : TACEExtractProc;
  2068.  
  2069.  
  2070. implementation
  2071.  
  2072. ////////////////////////////////////////////////////////////////////////
  2073. // LoadAceDll
  2074.  
  2075. function LoadAceDll(unpackdllpath : string) : Boolean;
  2076. begin
  2077.   if (Length(unpackdllpath)>0) and
  2078.      (unpackdllpath[Length(unpackdllpath)]<>'\') then
  2079.     AceDllInstance := LoadLibrary(PChar(unpackdllpath + '\UnAceV2.Dll'))
  2080.   else
  2081.     AceDllInstance := LoadLibrary(PChar(unpackdllpath + 'UnAceV2.Dll'));
  2082.  
  2083.   if (AceDllInstance <> 0) then
  2084.   begin // get addresses of functions
  2085.     @ACEInitDll         :=GetProcAddress(AceDllInstance,'ACEInitDll');
  2086.     @ACEReadArchiveData :=GetProcAddress(AceDllInstance,'ACEReadArchiveData');
  2087.     @ACEList            :=GetProcAddress(AceDllInstance,'ACEList');
  2088.     @ACETest            :=GetProcAddress(AceDllInstance,'ACETest');
  2089.     @ACEExtract         :=GetProcAddress(AceDllInstance,'ACEExtract');
  2090.     if (@ACEInitDll=nil) or (@ACEReadArchiveData=nil) or
  2091.        (@ACEList=nil) or (@ACETest=nil) or (@ACEExtract=nil) then
  2092.     begin // one or more functions not found
  2093.       FreeLibrary(AceDllInstance);
  2094.       AceDllInstance:=0;
  2095.     end;
  2096.   end;
  2097.   Result:= AceDllInstance <> 0;
  2098. end;
  2099.  
  2100. ////////////////////////////////////////////////////////////////////////
  2101. // Unload ACE dll from memory
  2102.  
  2103. procedure UnLoadAceDll;
  2104. begin
  2105.   if AceDllInstance <> 0 then
  2106.     FreeLibrary(AceDllInstance);
  2107. end;
  2108.  
  2109. ////////////////////////////////////////////////////////////////////////
  2110. // ACE List
  2111.  
  2112. function CallACEList(ArchiveName : string) : integer;
  2113. var
  2114.   List : tACEListStruc;
  2115. begin
  2116.   FillChar(List, SizeOf(List), 0);     // set all fields to zero
  2117.  
  2118.   List.Files.SourceDir   := '';        // archive main directory is
  2119.                                        // base directory for FileList
  2120.   List.Files.FileList    := FileList;  // set FileList
  2121.   List.Files.ExcludeList := '';        // no files to exclude
  2122.   List.Files.FullMatch   := False;     // also list files partially matching
  2123.                                        // (for instance: list DIR1\TEST.DAT
  2124.                                        //  if FileList specifies TEST.DAT)
  2125.  
  2126.   Result:=ACEList(PChar(ArchiveName), @List);
  2127. end;
  2128.  
  2129. ////////////////////////////////////////////////////////////////////////
  2130. // ACE Test
  2131.  
  2132. function CallACETest(ArchiveName : string) : integer;
  2133. var
  2134.   Test : tACETestStruc;
  2135. begin
  2136.   FillChar(Test, SizeOf(Test), 0);      // set all fields to zero
  2137.  
  2138.  
  2139.   Test.Files.SourceDir   := '';         // archive main directory is
  2140.                                         // base directory for FileList
  2141.   Test.Files.FileList    := FileList;   // set FileList
  2142.   Test.Files.ExcludeList := '';         // no files to exclude
  2143.   Test.Files.FullMatch   := False;      // also test files partially matching
  2144.  
  2145.   Test.DecryptPassword   := '';         // no encrypted file expected
  2146.  
  2147.   Result:=ACETest(PChar(ArchiveName), @Test);
  2148. end;
  2149.  
  2150. ////////////////////////////////////////////////////////////////////////
  2151. // ACE Extract
  2152.  
  2153. function CallACEExtract(ArchiveName     : string;
  2154.                         DestinationDir  : string;
  2155.                         DecryptPassword : string;
  2156.                         DoExcludePath   : LongBool) : integer;
  2157.  
  2158. var
  2159.   Extract          : tACEExtractStruc;
  2160.   zDestinationDir  : array[0..255] of char;
  2161.   zDecryptPassword : array[0..255] of char;
  2162. begin
  2163. //  memset(&Extract, 0, sizeof(Extract));         // set all fields to zero
  2164.   FillChar(Extract, SizeOf(Extract), 0);          // set all fields to zero
  2165.  
  2166.  
  2167.   Extract.Files.SourceDir      := '';             // archive main directory is
  2168.                                                   // base dir for FileList
  2169.   Extract.Files.FileList       := FileList;       // set FileList
  2170.   Extract.Files.ExcludeList    := '';             // no files to exclude
  2171.   Extract.Files.FullMatch      := False;          // also extract files
  2172.                                                   // partially matching
  2173.  
  2174.   Extract.DestinationDir       := StrPCopy(zDestinationDir, DestinationDir); // directory to extract to
  2175.   Extract.ExcludePath          := DoExcludePath;  // extract files with path?
  2176.   Extract.DecryptPassword      := StrPCopy(zDecryptPassword, DecryptPassword);
  2177.  
  2178.   Result:=ACEExtract(PChar(ArchiveName), @Extract);
  2179. end;
  2180.  
  2181. ////////////////////////////////////////////////////////////////////////
  2182.  
  2183. initialization
  2184.  
  2185. finalization
  2186.   UnLoadAceDll;
  2187. end.
  2188.