home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 May
/
Pcwk0597.iso
/
borland
/
cb
/
setup
/
cbuilder
/
data.z
/
LZEXPAND.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1997-02-28
|
3KB
|
61 lines
{*******************************************************}
{ }
{ Delphi Run-time Library }
{ Windows 32bit API Interface Unit }
{ }
{ Copyright (c) 1996 Borland International }
{ }
{*******************************************************}
unit LZExpand;
interface
uses Windows;
{ Error Return Codes }
const
LZERROR_BADINHANDLE = -1; { invalid input handle }
LZERROR_BADOUTHANDLE = -2; { invalid output handle }
LZERROR_READ = -3; { corrupt compressed file format }
LZERROR_WRITE = -4; { out of space for output file }
LZERROR_GLOBALLOC = -5; { insufficient memory for LZFile struct }
LZERROR_GLOBLOCK = -6; { bad global handle }
LZERROR_BADVALUE = -7; { input parameter out of acceptable range }
LZERROR_UNKNOWNALG = -8; { compression algorithm not recognized }
{ Prototypes }
function LZCopy(Source, Dest: Integer): Longint; stdcall;
function LZInit(Source: Integer): Integer; stdcall;
function GetExpandedNameA(Source, Buffer: PAnsiChar): Integer; stdcall;
function GetExpandedNameW(Source, Buffer: PWideChar): Integer; stdcall;
function GetExpandedName(Source, Buffer: PChar): Integer; stdcall;
function LZOpenFileA(Filename: PAnsiChar; var ReOpenBuff: TOFStruct; Style: Word): Integer; stdcall;
function LZOpenFileW(Filename: PWideChar; var ReOpenBuff: TOFStruct; Style: Word): Integer; stdcall;
function LZOpenFile(Filename: PChar; var ReOpenBuff: TOFStruct; Style: Word): Integer; stdcall;
function LZSeek(hFile: Integer; Offset: Longint; Origin: Integer): Longint; stdcall;
function LZRead(hFile: Integer; Buffer: LPSTR; Count: Integer): Integer; stdcall;
procedure LZClose(hFile: Integer); stdcall;
implementation
const
lz32 = 'LZ32.DLL';
function GetExpandedNameA; external lz32 name 'GetExpandedNameA';
function GetExpandedNameW; external lz32 name 'GetExpandedNameW';
function GetExpandedName; external lz32 name 'GetExpandedNameA';
procedure LZClose; external lz32 name 'LZClose';
function LZCopy; external lz32 name 'LZCopy';
function LZInit; external lz32 name 'LZInit';
function LZOpenFileA; external lz32 name 'LZOpenFileA';
function LZOpenFileW; external lz32 name 'LZOpenFileW';
function LZOpenFile; external lz32 name 'LZOpenFileA';
function LZRead; external lz32 name 'LZRead';
function LZSeek; external lz32 name 'LZSeek';
end.