home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / CHFLZ100.ZIP / LZIMPLIC.PAS < prev    next >
Pascal/Delphi Source File  |  1996-09-05  |  6KB  |  153 lines

  1.  
  2. {$I LZDefine.inc}
  3.  
  4. unit LZImplic;
  5. {sample "implicit" or "static" import unit for ChiefLZ.dll}
  6.  
  7. interface
  8. uses
  9. {$ifdef Win32}
  10. Windows,
  11. {$endif Win32}
  12. ChfTypes;
  13.  
  14. {exported functions}
  15.  
  16. function IsChiefLZArchive(const fName: {$ifdef Win32} string
  17.                                        {$else}        PChar
  18.                                        {$endif} ): boolean;
  19. {$ifdef Win32} stdcall; {$endif Win32}
  20.  
  21. {$ifdef Win32}
  22. function GetChiefLZFileName(const fName: string): string; stdcall;
  23. {$else}
  24. function GetChiefLZFileName(fName, Dest:PChar): boolean;
  25. {$endif Win32}
  26.  
  27. function GetChiefLZFileSize(fName: {$ifdef Win32} string
  28.                                    {$else Win32}  PChar
  29.                                    {$endif Win32}): LongInt;
  30. {$ifdef Win32} stdcall; {$endif Win32}
  31.  
  32.  
  33. function GetChiefLZArchiveInfo(const ArchName: {$ifdef Win32} string
  34.                                                {$else Win32}  PChar
  35.                                                {$endif Win32};
  36.                                var   Header: TChiefLZArchiveHeader): boolean;
  37. {$ifdef Win32} stdcall; {$endif Win32}
  38.  
  39. function GetChiefLZArchiveSize(const ArchName: {$ifdef Win32} string
  40.                                                {$else Win32}  PChar
  41.                                                {$endif Win32}): LongInt;
  42. {$ifdef Win32} stdcall; {$endif Win32}
  43.  
  44. function LZCompress(const {$ifdef Win32} Source, Dest:   string
  45.                           {$else}        aSource, aDest: pChar
  46.                           {$endif};
  47.                     LZQuestion: TLZQuestionFunc;
  48.                     aProc:      TLZReportProc): LongInt;
  49. {$ifdef Win32} stdcall; {$endif Win32}
  50.  
  51. function LZDecompress({$ifdef Win32} Source, Dest:  string
  52.                       {$else} const aSource, aDest: PChar
  53.                       {$endif};
  54.                       LZQuestion: TLZQuestionFunc;
  55.                       aProc:      TLZReportProc):LongInt;
  56. {$ifdef Win32} stdcall; {$endif Win32}
  57.  
  58.  
  59. function IsChiefLZFile(const fName: {$ifdef Win32} string
  60.                                     {$else}        PChar
  61.                                     {$endif}): boolean;
  62. {$ifdef Win32} stdcall; {$endif Win32}
  63.  
  64.  
  65. function LZArchive(const fSpec, ArchName: {$ifdef Win32} string
  66.                                           {$else}        PChar
  67.                                           {$endif};
  68.                    LZRecurseDirs: TLZRecurse;
  69.                    aProc:         TLZReportProc): LongInt;
  70. {$ifdef Win32} stdcall; {$endif Win32}
  71.  
  72.  
  73. function LZDearchive(ArchName: {$ifdef Win32} string
  74.                                {$else}        PChar
  75.                                {$endif};
  76.                     {$ifdef Win32} DefDir: string
  77.                     {$else} const aDefDir: PChar
  78.                     {$endif};
  79.                      LZQuestion: TLZQuestionFunc;
  80.                      aProc:      TLZReportProc;
  81.                      aRename:    TLZRenameFunc): LongInt;
  82. {$ifdef Win32} stdcall; {$endif Win32}
  83.  
  84.  
  85. function LZCompressEx(const {$ifdef Win32} Name:  string
  86.                             {$else}        aName: PChar
  87.                             {$endif};
  88.                       ReplaceQuestion: TLZQuestionFunc;
  89.                       aProc:           TLZReportProc): LongInt;
  90. {$ifdef Win32} stdcall; {$endif Win32}
  91.  
  92.  
  93. function LZDecompressEx({$ifdef Win32} Name:  string
  94.                         {$else}        aName: PChar
  95.                         {$endif};
  96.                         ReplaceQuestion: TLZQuestionFunc;
  97.                         aProc:           TLZReportProc): LongInt;
  98. {$ifdef Win32} stdcall; {$endif Win32}
  99.  
  100.  
  101. function GetLZMarkerChar: Char; {$ifdef Win32} stdcall; {$endif}
  102.  
  103. procedure SetLZMarkerChar(const NewChar: Char);
  104.                                         {$ifdef Win32} stdcall; {$endif}
  105.  
  106. function ChiefLZDLLVersion: Integer; {$ifdef Win32} stdcall; {$endif}
  107.  
  108. function GetFullLZName(Const X    : TChiefLZArchiveHeader;
  109.                              Index: Integer): String;
  110. {$ifdef Win32} stdcall; {$endif}
  111.  
  112. Function LoadChiefLZDLL(DLLName: PChar): {$ifdef Win32} BOOL {$else} Integer {$endif};
  113. {Dummy for compatibility with LZExplic}
  114.  
  115. Function UnloadChiefLZDLL: {$ifdef Win32} BOOL {$else} Boolean {$endif};
  116. {Dummy for compatibility with LZExplic}
  117.  
  118. implementation
  119.  
  120. const ChiefDLL = 'ChiefLZ';
  121.  
  122. {-------- functions exported in ChiefLZ.dll -----------------}
  123.   function  LZCompress; external ChiefDLL     index 1;
  124.   function  LZDecompress; external ChiefDLL   index 2;
  125.   function  IsChiefLZFile; external ChiefDLL  index 3;
  126.   function  LZArchive; external ChiefDLL      index 4;
  127.   function  LZDeArchive; external ChiefDLL    index 5;
  128.   function  IsChiefLZArchive; external ChiefDLL    index 6;
  129.   function  GetChiefLZFileName; external ChiefDLL  index 7;
  130.   function  GetChiefLZFileSize; external ChiefDLL  index 8;
  131.   function  GetChiefLZArchiveInfo; external ChiefDLL index 9;
  132.   function  LZCompressEx; external ChiefDLL       index 10;
  133.   function  LZDeCompressEx; external ChiefDLL     index 11;
  134.   function  GetLZMarkerChar; external ChiefDLL    index 12;
  135.   procedure SetLZMarkerChar; external ChiefDLL    index 13;
  136.   function  GetFullLZName; external ChiefDLL      index 14;
  137.   function  ChiefLZDLLVersion; external ChiefDLL  index 15;
  138.   function  GetChiefLZArchiveSize; external ChiefDLL  index 16;
  139.  
  140. {--------------------------------------------------------}
  141. Function LoadChiefLZDLL(DLLName: PChar): {$ifdef Win32} BOOL {$else} Integer {$endif};
  142. Begin
  143.   LoadChiefLZDLL := {$ifdef Win32} True {$else} 0 {$endif};
  144. End;
  145.  
  146. Function UnloadChiefLZDLL: {$ifdef Win32} BOOL {$else} Boolean {$endif};
  147. Begin
  148.   UnloadChiefLZDLL := True
  149. End;
  150.  
  151. End.
  152.  
  153.