⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 atxunpack_dll.pas

📁 支持版本:Delphi 5-2009, C++Builder 5-2009 ATViewer特性: Text, Binary, Hex, Unicode:所有文件
💻 PAS
字号:
unit ATxUnpack_Dll;

interface

function FUnpackAll(const fn, sdir: string): boolean;
function FUnpackSingle(const fn, sdir, fnSingle: string): boolean;


implementation

uses
  SysUtils, Unzip, UnzipDll, UnrarDll;

function FUnpackAll(const fn, sdir: string): boolean;
var
  s: string;
begin
  s := LowerCase(ExtractFileExt(fn));
  if s = '.zip' then
  begin
    UnzipInit;
    Result := UnzipAll(fn, sdir) = PK_OK;
    UnzipFree;
  end
  else
  if s = '.rar' then
  begin
    Result := UnrarAll(fn, sdir);
  end
  else
    Result := False;
end;


function FUnpackSingle(const fn, sdir, fnSingle: string): boolean;
var
  s: string;
begin
  s := LowerCase(ExtractFileExt(fn));
  if s = '.zip' then
  begin
    UnzipInit;
    Result := UnzipSingle(fn, sdir, [PChar(fnSingle)]) = PK_OK;
    UnzipFree;
  end
  else
  if s = '.rar' then
  begin
    Result := UnrarSingle(fn, sdir, fnSingle);
  end
  else
    Result := False;
end;


end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -