UnZip32.pas.svn-base
Upload User: xt1950
Upload Date: 2019-08-10
Package Size: 6734k
Code Size: 21k
Development Platform:

Delphi

  1. (*
  2. -----------------------------------------------------------------------------------------
  3.                                      STATE
  4. -----------------------------------------------------------------------------------------
  5.  THIS SOFTWARE IS FREEWARE AND IS PROVIDED AS IS AND COMES WITH NO WARRANTY OF ANY
  6.  KIND, EITHER EXPRESSED OR IMPLIED. IN NO EVENT WILL THE AUTHOR(S) BE LIABLE FOR
  7.  ANY DAMAGES RESULTING FROM THE USE OF THIS SOFTWARE.
  8. -----------------------------------------------------------------------------------------
  9.                                   INFORMATION
  10. -----------------------------------------------------------------------------------------
  11.  Description : Info-Zip's header files for its UnZip32.dll ( version 5.4 ) translated to
  12.                Pascal (Delphi)
  13.  Tested      : Delphi 2, 3, 4, 5
  14.  Author      : Theo Bebekis <bebekis@otenet.gr> 
  15.  More info   : For more information and information regarding Copyright and Distribution
  16.                rights of the Info-Zip's work contact Info-Zip at
  17.                http://www.cdrom.com/pub/infozip/
  18.                InfoZip provides the Wiz.exe, a Windows application for zipping and
  19.                unzipping files. You can find examples for the dll calls in the Wiz.exe
  20.                sources (C language) which you can obtain from the above site.
  21.  License     : Check Info-Zip's license in the accompanying license.htm
  22.  Thanks to   : Davide Moretti
  23.        Marcel van Brakel
  24.        Rudy Velthuis
  25.        Danny Thorpe
  26.                from the Delphi-JEDI@onelist.com mailing list who helped me with their
  27.                advises to finish this translation.
  28.  JEDI        : http://www.delphi-jedi.org/
  29. -----------------------------------------------------------------------------------------
  30.                                      HISTORY
  31. -----------------------------------------------------------------------------------------
  32.  Version   Date          Changes - Additions                                By
  33. -----------------------------------------------------------------------------------------
  34.  0.01      30.06.1999    Initial Version                                    Theo Bebekis
  35.  changes (01.2005) - DLL and all its functions must be loaded explicitly
  36.    using LoadUnZipDLL;
  37. -----------------------------------------------------------------------------------------
  38.    
  39. *)
  40. unit UnZip32;
  41. interface
  42. uses
  43.   Windows;
  44. const
  45.   UNZIP_DLL = 'UNZIP32.DLL';
  46. { unzver.h }
  47. const
  48.   UNZIP_DLL_VERSION = '5.52';
  49.   COMPANY_NAME = 'Info-ZIP';  
  50. { windll.h }
  51. const
  52.   IDM_REPLACE_NO        = 100;
  53.   IDM_REPLACE_TEXT      = 101;
  54.   IDM_REPLACE_YES       = 102;
  55.   IDM_REPLACE_ALL       = 103;
  56.   IDM_REPLACE_NONE      = 104;
  57.   IDM_REPLACE_RENAME    = 105;
  58.   IDM_REPLACE_HELP      = 106;
  59. { structs.h }
  60. const
  61.   PATH_MAX = 260; { max total file or directory name path }
  62. { user functions for use with the TUserFunctions structure }  
  63. type
  64.   TDllPrnt = function(Buffer: PChar; Size: ULONG): integer; stdcall;
  65.   TDllPassword = function(P: PChar; N: Integer; M, Name: PChar): integer; stdcall;
  66.   TDllService = function (CurFile: PChar; Size: ULONG): integer; stdcall;
  67.   TDllSnd = procedure; stdcall;
  68.   TDllReplace = function(FileName: PChar): integer; stdcall;
  69.   TDllMessage = procedure (UnCompSize : ULONG;
  70.                            CompSize   : ULONG;
  71.                            Factor     : UINT;
  72.                            Month      : UINT;
  73.                            Day        : UINT;
  74.                            Year       : UINT;
  75.                            Hour       : UINT;
  76.                            Minute     : UINT;
  77.                            C          : Char;
  78.                            FileName   : PChar;
  79.                            MethBuf    : PChar;
  80.                            CRC        : ULONG;
  81.                            Crypt      : Char); stdcall;
  82. type
  83.   PUserFunctions = ^TUserFunctions;
  84.   USERFUNCTIONS = record
  85.     Print                  : TDllPrnt;
  86.     Sound                  : TDllSnd;
  87.     Replace                : TDllReplace;
  88.     Password               : TDllPassword;
  89.     SendApplicationMessage : TDllMessage;
  90.     ServCallBk             : TDllService;
  91.     TotalSizeComp          : ULONG;
  92.     TotalSize              : ULONG;
  93.     CompFactor             : Integer;
  94.     NumMembers             : UINT;
  95.     cchComment             : UINT;
  96.   end;
  97.   TUserFunctions = USERFUNCTIONS;
  98.   { unzip options }
  99. type
  100.   PDCL = ^TDCL;
  101.   DCL = record
  102.     ExtractOnlyNewer  : Integer; { true if you are to extract only newer }
  103.     SpaceToUnderscore : Integer; { true if convert space to underscore }
  104.     PromptToOverwrite : Integer; { true if prompt to overwrite is wanted }
  105.     fQuiet            : Integer; { quiet flag. 1 = few messages, 2 = no messages, 0 = all messages }
  106.     nCFlag            : Integer; { write to stdout if true }
  107.     nTFlag            : Integer; { test zip file }
  108.     nVFlag            : Integer; { verbose listing }
  109.     nUFlag            : Integer; { "update" (extract only newer/new files) }
  110.     nZFlag            : Integer; { display zip file comment }
  111.     nDFlag            : Integer; { all args are files/dir to be extracted }
  112.     nOFlag            : Integer; { true if you are to always over-write files, false if not }
  113.     nAFlag            : Integer; { do end-of-line translation }
  114.     nZIFlag           : Integer; { get zip info if true }
  115.     C_flag            : Integer; { be case insensitive if TRUE }
  116.     fPrivilege        : Integer; { 1 => restore Acl's, 2 => Use privileges }
  117.     lpszZipFN         : PChar;   { zip file name }
  118.     lpszExtractDir    : PChar;   { Directory to extract to. NULL for the current directory }
  119.   end ;
  120.   TDCL = DCL;
  121. { unzip.h }
  122. type
  123.   _UzpBuffer = record        { rxstr }
  124.     StrLength : ULONG;       { length of string }
  125.     StrPtr    : PChar;       { pointer to string }
  126.   end ;
  127.   TUzpBuffer = _UzpBuffer;
  128.   
  129. type
  130. {  intended to be a private struct  }
  131.   _ver = record
  132.     Major      : UCHAR;        { e.g., integer 5 }
  133.     Minor      : UCHAR;        { e.g., 2 }
  134.     PatchLevel : UCHAR;        { e.g., 0 }
  135.     Not_Used   : UCHAR;
  136.   end ;
  137.   TVersionType = _ver;
  138. type
  139.   PUzpVer = ^TUzpVer;  
  140.   _UzpVer = record
  141.     StructLen    : ULONG;          { length of the struct being passed }
  142.     Flag         : ULONG;          { bit 0: is_beta bit 1: uses_zlib }
  143.     BetaLevel    : PChar;          { e.g., "g BETA" or "" }
  144.     Date         : PChar;          { e.g., "4 Sep 95" (beta) or "4 September 1995" }
  145.     ZLib_Version : PChar;          { e.g., "0.95" or NULL }
  146.     UnZip        : TVersionType;
  147.     ZipInfo      : TVersionType;
  148.     OS2Dll       : TVersionType;
  149.     WinDll       : TVersionType;
  150.   end;
  151.   TUzpVer = _UzpVer;
  152. { for Visual BASIC access to Windows DLLs }
  153. type
  154.   _UzpVer2 = record
  155.     StructLen     : ULONG;                    { length of the struct being passed }
  156.     Flag          : ULONG;                    { bit 0: is_beta bit 1: uses_zlib }
  157.     BetaLevel     : array[0..10-1] of Char;   { e.g., "g BETA" or "" }
  158.     Date          : array[0..20-1] of Char;   { e.g., "4 Sep 95" (beta) or "4 September 1995" }
  159.     ZLib_Version  : array[0..10-1] of Char;   { e.g., "0.95" or NULL }
  160.     UnZip         : TVersionType;
  161.     ZipInfo       : TVersionType;
  162.     OS2Dll        : TVersionType;
  163.     WinDll        : TVersionType;
  164.   end ;
  165.   TUzpVer2 = _UzpVer2;
  166. const
  167.   UZPVER_LEN = SizeOf(TUzpVer); 
  168. { Return (and exit) values of the public UnZip API functions. }
  169. const
  170. { external return codes  }       
  171.   PK_OK                 = 0; { no error }
  172.   PK_COOL               = 0; { no error }
  173.   PK_GNARLY             = 0; { no error }
  174.   PK_WARN               = 1; { warning error }
  175.   PK_ERR                = 2; { error in zipfile }
  176.   PK_BADERR             = 3; { severe error in zipfile }
  177.   PK_MEM                = 4; { insufficient memory (during initialization) }
  178.   PK_MEM2               = 5; { insufficient memory (password failure) }
  179.   PK_MEM3               = 6; { insufficient memory (file decompression) }
  180.   PK_MEM4               = 7; { insufficient memory (memory decompression) }
  181.   PK_MEM5               = 8; { insufficient memory (not yet used) }
  182.   PK_NOZIP              = 9; { zipfile not found }
  183.   PK_PARAM              = 10; { bad or illegal parameters specified }
  184.   PK_FIND               = 11; { no files found }
  185.   PK_DISK               = 50; { disk full }
  186.   PK_EOF                = 51; { unexpected EOF }
  187.   IZ_CTRLC              = 80; { user hit ^C to terminate }
  188.   IZ_UNSUP              = 81; { no files found: all unsup. compr/encrypt. }
  189.   IZ_BADPWD             = 82; { no files found: all had bad password }
  190. { internal and DLL-only return codes  }
  191.   IZ_DIR                = 76; { potential zipfile is a directory }
  192.   IZ_CREATED_DIR        = 77; { directory created: set time and permissions }
  193.   IZ_VOL_LABEL          = 78; { volume label, but can't set on hard disk }
  194.   IZ_EF_TRUNC           = 79; { local extra field truncated (PKZIP'd) }
  195. { return codes of password fetches (negative = user abort; positive = error)  }
  196.   IZ_PW_ENTERED          = 0; { got some password string; use/try it }
  197.   IZ_PW_CANCEL           = -1; { no password available (for this entry) }
  198.   IZ_PW_CANCELALL        = -2; { no password, skip any further pwd. request }
  199.   IZ_PW_ERROR            = 5; { = PK_MEM2 : failure (no mem, no tty, ...) }
  200. { flag values for status callback function  }
  201.   UZ_ST_START_EXTRACT    = 1;
  202.   UZ_ST_IN_PROGRESS      = 2;
  203.   UZ_ST_FINISH_MEMBER    = 3;
  204. { return values of status callback function  }
  205.   UZ_ST_CONTINUE         = 0;
  206.   UZ_ST_BREAK            = 1;
  207. type
  208.   PPChar = ^PChar;
  209.   { dll prototypes }
  210.   { decs.h }
  211. {procedure  Wiz_NoPrinting(Flag: Integer); stdcall;
  212. function   Wiz_Validate(Archive: PChar;  AllCodes: Integer): Integer; stdcall;
  213. function   Wiz_Init(var pG; var UserFunc: TUserFunctions): Bool; stdcall;
  214. function   Wiz_SetOpts(var pG; var Options: TDCL): Bool; stdcall;
  215. function   Wiz_Unzip(var pG; ifnc: Integer; ifnv: PPChar; xfnc: Integer; xfnv: PPChar): Integer; stdcall;
  216. function   Wiz_SingleEntryUnzip(ifnc: Integer; ifnv: PPChar; xfnc: Integer;
  217.                                 xfnv: PPChar; var Options: TDCL;
  218.                                 var UserFunc: TUserFunctions): Integer; stdcall;
  219. function   Wiz_UnzipToMemory(Zip: PChar;  FileName: PChar; var UserFunctions: TUserFunctions;
  220.                              var RetStr: TUzpBuffer): Integer; stdcall;
  221. function   Wiz_Grep(Archive: PChar; FileName: PChar; Pattern: PChar; Cmd: Integer;
  222.                     SkipBin: Integer; var UserFunctions: TUserFunctions): Integer; stdcall;}
  223. type Wiz_NoPrintingProc = procedure(Flag: Integer); stdcall;
  224. type Wiz_ValidateProc = function(Archive: PChar; AllCodes: Integer): Integer; stdcall;
  225. type Wiz_InitProc = function(var pG; var UserFunc: TUserFunctions): Bool; stdcall;
  226. type Wiz_SetOptsProc = function(var pG; var Options: TDCL): Bool; stdcall;
  227. type Wiz_UnzipProc = function(var pG; ifnc: Integer; ifnv: PPChar;
  228.   xfnc: Integer; xfnv: PPChar): Integer; stdcall;
  229. type Wiz_SingleEntryUnzipProc = function(ifnc: Integer; ifnv: PPChar; xfnc: Integer;
  230.   xfnv: PPChar; var Options: TDCL; var UserFunc: TUserFunctions): Integer; stdcall;
  231. type Wiz_UnzipToMemoryProc = function(Zip: PChar; FileName: PChar; var UserFunctions: TUserFunctions;
  232.   var RetStr: TUzpBuffer): Integer; stdcall;
  233. type Wiz_GrepProc = function(Archive: PChar; FileName: PChar; Pattern: PChar; Cmd: Integer;
  234.   SkipBin: Integer; var UserFunctions: TUserFunctions): Integer; stdcall;
  235. var
  236.   Wiz_NoPrinting: Wiz_NoPrintingProc;
  237.   Wiz_Validate: Wiz_ValidateProc;
  238.   Wiz_Init: Wiz_InitProc;
  239.   Wiz_SetOpts: Wiz_SetOptsProc;
  240.   Wiz_Unzip: Wiz_UnzipProc;
  241.   Wiz_SingleEntryUnzip: Wiz_SingleEntryUnzipProc;
  242.   Wiz_UnzipToMemory: Wiz_UnzipToMemoryProc;
  243.   Wiz_Grep: Wiz_GrepProc;
  244.   { unzip.h }
  245. {procedure  UzpFreeMemBuffer(var RetStr: TUzpBuffer); stdcall;
  246. function   UzpVersion: PUzpVer; stdcall;
  247. procedure  UzpVersion2(var Version: TUzpVer2); stdcall;}
  248. type UzpFreeMemBufferProc = procedure(var RetStr: TUzpBuffer); stdcall;
  249. type UzpVersionProc = function: PUzpVer; stdcall;
  250. type UzpVersion2Proc = procedure(var Version: TUzpVer2); stdcall;
  251. var
  252.   UzpFreeMemBuffer: UzpFreeMemBufferProc;
  253.   UzpVersion: UzpVersionProc;
  254.   UzpVersion2: UzpVersion2Proc;
  255.   { helper }
  256. function IsExpectedUnZipDllVersion: boolean;
  257. {functions for loading/unloading DLL}
  258. function LoadUnZipDLL: Boolean;
  259. procedure UnloadUnZipDLL;
  260. implementation
  261. uses
  262.  SysUtils;
  263. var
  264.   hLib: HMODULE;
  265. function LoadUnZipDLL: Boolean;
  266. begin
  267.   Result := False;
  268.   hLib := LoadLibrary('UNZIP32.DLL');
  269.   if hLib = 0 then Exit;
  270.   Wiz_NoPrinting := Wiz_NoPrintingProc(GetProcAddress(hLib, 'Wiz_NoPrinting'));
  271.   Wiz_Validate := Wiz_ValidateProc(GetProcAddress(hLib, 'Wiz_Validate'));
  272.   Wiz_Init := Wiz_InitProc(GetProcAddress(hLib, 'Wiz_Init'));
  273.   Wiz_SetOpts := Wiz_SetOptsProc(GetProcAddress(hLib, 'Wiz_SetOpts'));
  274.   Wiz_Unzip := Wiz_UnzipProc(GetProcAddress(hLib, 'Wiz_Unzip'));
  275.   Wiz_SingleEntryUnzip := Wiz_SingleEntryUnzipProc(GetProcAddress(hLib, 'Wiz_SingleEntryUnzip'));
  276.   Wiz_UnzipToMemory := Wiz_UnzipToMemoryProc(GetProcAddress(hLib, 'Wiz_UnzipToMemory'));
  277.   Wiz_Grep := Wiz_GrepProc(GetProcAddress(hLib, 'Wiz_Grep'));
  278.   UzpFreeMemBuffer := UzpFreeMemBufferProc(GetProcAddress(hLib, 'UzpFreeMemBuffer'));
  279.   UzpVersion := UzpVersionProc(GetProcAddress(hLib, 'UzpVersion'));
  280.   UzpVersion2 := UzpVersion2Proc(GetProcAddress(hLib, 'UzpVersion2'));
  281.   if (not Assigned(Wiz_NoPrinting) or not Assigned(Wiz_Validate)
  282.     or not Assigned(Wiz_Init) or not Assigned(Wiz_SetOpts)
  283.     or not Assigned(Wiz_Unzip) or not Assigned(Wiz_SingleEntryUnzip) or
  284.     not Assigned(Wiz_UnzipToMemory) or not Assigned(Wiz_Grep)
  285.     or not Assigned(UzpFreeMemBuffer) or not Assigned(UzpVersion)
  286.     or not Assigned(UzpVersion2)) then
  287.     Result := False
  288.   else
  289.     Result := True;
  290. end;
  291. procedure UnLoadUnZipDLL;
  292. begin
  293.   FreeLibrary(hLib);
  294. end;
  295.   { dll routines }
  296.   { decs.h }
  297. {procedure  Wiz_NoPrinting; external UNZIP_DLL name 'Wiz_NoPrinting';
  298. function   Wiz_Validate; external UNZIP_DLL name 'Wiz_Validate';
  299. function   Wiz_Init; external UNZIP_DLL name 'Wiz_Init';
  300. function   Wiz_SetOpts; external UNZIP_DLL name 'Wiz_SetOpts';
  301. function   Wiz_Unzip; external UNZIP_DLL name 'Wiz_Unzip';
  302. function   Wiz_SingleEntryUnzip; external UNZIP_DLL name 'Wiz_SingleEntryUnzip';
  303. function   Wiz_UnzipToMemory; external UNZIP_DLL name 'Wiz_UnzipToMemory';
  304. function   Wiz_Grep; external UNZIP_DLL name 'Wiz_Grep';}
  305.   { unzip.h }
  306. {procedure  UzpFreeMemBuffer; external UNZIP_DLL name 'UzpFreeMemBuffer';
  307. function   UzpVersion; external UNZIP_DLL name 'UzpVersion';
  308. procedure  UzpVersion2; external UNZIP_DLL name 'UzpVersion2';}
  309. type
  310.  TFVISubBlock = (sbCompanyName, sbFileDescription, sbFileVersion, sbInternalName, sbLegalCopyright,
  311.    sbLegalTradeMarks, sbOriginalFilename, sbProductName, sbProductVersion, sbComments);
  312. {----------------------------------------------------------------------------------
  313.  Description    : retrieves selected version information from the specified
  314.                   version-information resource. True on success
  315.  Parameters     :
  316.                   const FullPath : string;        the exe or dll full path
  317.                   SubBlock       : TFVISubBlock;  the requested sub block information ie sbCompanyName
  318.                   var sValue     : string         the returned string value
  319.  Error checking : YES
  320.  Notes          :
  321.                   1. 32bit only ( It does not work with 16-bit Windows file images )
  322.                   2. TFVISubBlock is declared as
  323.                      TFVISubBlock = (sbCompanyName, sbFileDescription, sbFileVersion, sbInternalName,
  324.                                      sbLegalCopyright, sbLegalTradeMarks, sbOriginalFilename,
  325.                                      sbProductName, sbProductVersion, sbComments);
  326.  Tested         : in Delphi 4 only
  327.  Author         : Theo Bebekis <bebekis@otenet.gr>
  328. -----------------------------------------------------------------------------------}
  329. function Get_FileVersionInfo(const FullPath: string; SubBlock: TFVISubBlock; var sValue: string):boolean;
  330. const
  331.  arStringNames : array[sbCompanyName..sbComments] of string =
  332.   ('CompanyName', 'FileDescription', 'FileVersion', 'InternalName', 'LegalCopyright',
  333.    'LegalTradeMarks', 'OriginalFilename', 'ProductName', 'ProductVersion', 'Comments');
  334. var
  335.   Dummy       : DWORD;
  336.   iLen        : DWORD;
  337.   pData       : PChar;
  338.   pVersion    : Pointer;
  339.   pdwLang     : PDWORD;
  340.   sLangID     : string;
  341.   sCharsetID  : string;
  342.   pValue      : PChar;
  343. begin
  344.   Result := False;
  345.   { get the size of the size in bytes of the file's version information}
  346.   iLen := GetFileVersionInfoSize(PChar(FullPath), Dummy);
  347.   if iLen = 0 then Exit;
  348.   { get the information }
  349.   pData := StrAlloc(iLen + 1);
  350.   if not GetFileVersionInfo(PChar(FullPath),  { pointer to filename string }
  351.                             0,                { ignored }
  352.                             iLen,             { size of buffer }
  353.                             pData)            { pointer to buffer to receive file-version info }
  354.   then Exit;
  355.   { get the national ID.
  356.     retrieve a pointer to an array of language and
  357.     character-set identifiers. Use these identifiers
  358.     to create the name of a language-specific
  359.     structure in the version-information resource}
  360.   if not VerQueryValue(pData,                       { address of buffer for version resource (in)}
  361.                        'VarFileInfoTranslation',  { address of value to retrieve (in) }
  362.                        pVersion,                    { address of buffer for version pointer (out)}
  363.                        iLen )                       { address of version-value length buffer (out)}
  364.   then Exit;
  365.   { analyze it }
  366.   pdwLang    := pVersion;
  367.   sLangID    := IntToHex(pdwLang^, 8);
  368.   sCharsetID := Copy(sLangID, 1, 4);
  369.   sLangID    := Copy(sLangID, 5, 4);
  370.   { get the info for the requested sub block }
  371.   if not VerQueryValue(pData,
  372.                        PChar('StringFileInfo' + sLangID + sCharsetID + '' + arStringNames[SubBlock]),
  373.                        pVersion,
  374.                        iLen)
  375.   then Exit;     
  376.   { copy it to sValue }
  377.   pValue := StrAlloc(iLen + 1);
  378.   StrLCopy(pValue, pVersion, iLen);
  379.   sValue := String(pValue);
  380.   StrDispose(pValue);
  381.   StrDispose(pData);
  382.   Result := True;
  383. end;      
  384. {----------------------------------------------------------------------------------
  385.  NOTE : this function uses the SearchPath WinAPI call to locate the dll and
  386.         then checks up for the version info using the above Get_FileVersionInfo
  387.         to get both the version number and the company name.
  388.         The dll's UzpVersion function does not check for the CompanyName.
  389.         I recommend to call the IsExpectedUnZipDllVersion function as the very
  390.         first step to ensure that is the right dll and not any other with a
  391.         similar name etc.
  392.         This function is more usefull when link the dll dynamically
  393. ----------------------------------------------------------------------------------}
  394. function IsExpectedUnZipDllVersion: boolean;
  395. const
  396.  DLL_WARNING =          'Cannot find %s.'  + #10 +
  397.                         'The Dll must be in the application directory, the path,' + #10 +
  398.                         'the Windows directory or the Windows System directory.';
  399.  DLL_VERSION_WARNING =  '%s has the wrong version number.' + #10 +
  400.                         'Insure that you have the correct dll''s installed, and that ' + #10 +
  401.                         'an older dll is not in your path or Windows System directory.';
  402. var
  403.  sCompany  : string;
  404.  sVersion  : string;
  405.  iRes      : DWORD;
  406.  pBuffer   : array[0..MAX_PATH - 1] of Char;
  407.  pFilePart : PChar;
  408. begin
  409.   Result := False;
  410.   iRes := SearchPath(nil,               { address of search path }
  411.                     PChar(UNZIP_DLL),   { address of filename }
  412.                     '.dll',             { address of extension }
  413.                     MAX_PATH - 1,       { size, in characters, of buffer }
  414.                     pBuffer,            { address of buffer for found filename }
  415.                     pFilePart           { address of pointer to file component }
  416.                     );
  417.   if iRes = 0 then
  418.     raise Exception.CreateFmt(DLL_WARNING, [UNZIP_DLL]);
  419.   if Get_FileVersionInfo(String(pBuffer), sbCompanyName, sCompany) and Get_FileVersionInfo(String(pBuffer), sbFileVersion, sVersion) then
  420.     Result := (sCompany = COMPANY_NAME) and (sVersion = UNZIP_DLL_VERSION);
  421.   if not Result then
  422.     raise Exception.CreateFmt(DLL_VERSION_WARNING, [UNZIP_DLL]);
  423. end;
  424. end.