0.6.0
major update
This commit is contained in:
87
imports/BrunsliDLL.pas
Normal file
87
imports/BrunsliDLL.pas
Normal file
@@ -0,0 +1,87 @@
|
||||
unit BrunsliDLL;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
WinAPI.Windows,
|
||||
System.SysUtils, System.Classes;
|
||||
|
||||
const
|
||||
BRUNSLI_OK = 0;
|
||||
BRUNSLI_NON_REPRESENTABLE = 1;
|
||||
BRUNSLI_MEMORY_ERROR = 2;
|
||||
BRUNSLI_INVALID_PARAM = 3;
|
||||
BRUNSLI_COMPRESSION_ERROR = 4;
|
||||
BRUNSLI_INVALID_BRN = 5;
|
||||
BRUNSLI_DECOMPRESSION_ERROR = 6;
|
||||
BRUNSLI_NOT_ENOUGH_DATA = 7;
|
||||
|
||||
type
|
||||
TBrunsliWriter = function(ctx: Pointer; data: Pointer; Size: NativeUInt)
|
||||
: Integer cdecl;
|
||||
|
||||
var
|
||||
brunsli_alloc_JPEGData: function: Pointer cdecl;
|
||||
brunsli_free_JPEGData: procedure(P: Pointer)cdecl;
|
||||
brunsli_GetMaximumEncodedSize: function(P: Pointer): Integer cdecl;
|
||||
brunsli_ReadJpeg: function(P: Pointer; data: Pointer; len: Integer)
|
||||
: Integer cdecl;
|
||||
brunsli_EncodeJpeg: function(P: Pointer; data: Pointer; len: Integer)
|
||||
: Integer cdecl;
|
||||
brunsli_DecodeJpeg: function(P: Pointer; data: Pointer; len: Integer)
|
||||
: Integer cdecl;
|
||||
brunsli_alloc_JPEGOutput: function(P: TBrunsliWriter; data: Pointer)
|
||||
: Pointer cdecl;
|
||||
brunsli_free_JPEGOutput: procedure(P: Pointer)cdecl;
|
||||
brunsli_WriteJpeg: function(P: Pointer; oup: Pointer): Integer cdecl;
|
||||
DLLLoaded: Boolean = False;
|
||||
|
||||
implementation
|
||||
|
||||
var
|
||||
DLLHandle: THandle;
|
||||
S: String;
|
||||
|
||||
procedure Init;
|
||||
begin
|
||||
S := 'brunsli.dll';
|
||||
DLLHandle := LoadLibrary(PChar(ExtractFilePath(ParamStr(0)) + S));
|
||||
if DLLHandle >= 32 then
|
||||
begin
|
||||
@brunsli_alloc_JPEGData := GetProcAddress(DLLHandle,
|
||||
'brunsli_alloc_JPEGData');
|
||||
@brunsli_free_JPEGData := GetProcAddress(DLLHandle,
|
||||
'brunsli_free_JPEGData');
|
||||
@brunsli_GetMaximumEncodedSize := GetProcAddress(DLLHandle,
|
||||
'brunsli_GetMaximumEncodedSize');
|
||||
@brunsli_ReadJpeg := GetProcAddress(DLLHandle, 'brunsli_ReadJpeg');
|
||||
@brunsli_EncodeJpeg := GetProcAddress(DLLHandle, 'brunsli_EncodeJpeg');
|
||||
@brunsli_DecodeJpeg := GetProcAddress(DLLHandle, 'brunsli_DecodeJpeg');
|
||||
@brunsli_alloc_JPEGOutput := GetProcAddress(DLLHandle,
|
||||
'brunsli_alloc_JPEGOutput');
|
||||
@brunsli_free_JPEGOutput := GetProcAddress(DLLHandle,
|
||||
'brunsli_free_JPEGOutput');
|
||||
@brunsli_WriteJpeg := GetProcAddress(DLLHandle, 'brunsli_WriteJpeg');
|
||||
DLLLoaded := Assigned(brunsli_alloc_JPEGData) and
|
||||
Assigned(brunsli_alloc_JPEGOutput);
|
||||
end
|
||||
else
|
||||
DLLLoaded := False;
|
||||
end;
|
||||
|
||||
procedure Deinit;
|
||||
begin
|
||||
if not DLLLoaded then
|
||||
exit;
|
||||
FreeLibrary(DLLHandle);
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
||||
Init;
|
||||
|
||||
finalization
|
||||
|
||||
Deinit;
|
||||
|
||||
end.
|
196
imports/FLACDLL.pas
Normal file
196
imports/FLACDLL.pas
Normal file
@@ -0,0 +1,196 @@
|
||||
unit FLACDLL;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
WinAPI.Windows,
|
||||
System.SysUtils, System.Classes;
|
||||
|
||||
const
|
||||
FLAC__MAX_CHANNELS = 8;
|
||||
FLAC__MAX_FIXED_ORDER = 4;
|
||||
FLAC__MAX_LPC_ORDER = 32;
|
||||
|
||||
type
|
||||
TFLAC__FrameHeader = record
|
||||
blocksize, sample_rate, channels: Cardinal;
|
||||
channel_assignment: Integer;
|
||||
bits_per_sample: Cardinal;
|
||||
case number_type: Integer of
|
||||
0:
|
||||
(frame_number: Cardinal; crc1: Byte);
|
||||
1:
|
||||
(sample_number: UInt64; crc2: Byte);
|
||||
end;
|
||||
|
||||
PFLAC__EntropyCodingMethod_PartitionedRiceContents = ^
|
||||
TFLAC__EntropyCodingMethod_PartitionedRiceContents;
|
||||
|
||||
TFLAC__EntropyCodingMethod_PartitionedRiceContents = record
|
||||
parameters, raw_bits: PCardinal;
|
||||
capacity_by_order: Cardinal;
|
||||
end;
|
||||
|
||||
TFLAC__EntropyCodingMethod_PartitionedRice = record
|
||||
order: Cardinal;
|
||||
contents: PFLAC__EntropyCodingMethod_PartitionedRiceContents;
|
||||
end;
|
||||
|
||||
TFLAC__EntropyCodingMethod = record
|
||||
case ftype: Integer of
|
||||
0:
|
||||
(partitioned_rice: TFLAC__EntropyCodingMethod_PartitionedRice);
|
||||
end;
|
||||
|
||||
TFLAC__Subframe_Fixed = record
|
||||
entropy_coding_method: TFLAC__EntropyCodingMethod;
|
||||
order: Cardinal;
|
||||
warmup: array [0 .. FLAC__MAX_CHANNELS - 1] of Integer;
|
||||
residual: PInteger;
|
||||
end;
|
||||
|
||||
TFLAC__Subframe_LPC = record
|
||||
entropy_coding_method: TFLAC__EntropyCodingMethod;
|
||||
order, qlp_coeff_precision: Cardinal;
|
||||
quantization_level: Integer;
|
||||
qlp_coeff, warmup: array [0 .. FLAC__MAX_LPC_ORDER - 1] of Integer;
|
||||
residual: PInteger;
|
||||
end;
|
||||
|
||||
TFLAC__Subframe = record
|
||||
case ftype: Integer of
|
||||
0:
|
||||
(constant: Integer; wb1: Cardinal);
|
||||
1:
|
||||
(fixed: TFLAC__Subframe_Fixed; wb2: Cardinal);
|
||||
2:
|
||||
(lpc: TFLAC__Subframe_LPC; wb3: Cardinal);
|
||||
3:
|
||||
(verbatim: PInteger; wb4: Cardinal);
|
||||
end;
|
||||
|
||||
PFLAC__Frame = ^TFLAC__Frame;
|
||||
|
||||
TFLAC__Frame = record
|
||||
header: TFLAC__FrameHeader;
|
||||
subframes: array [0 .. FLAC__MAX_CHANNELS - 1] of TFLAC__Subframe;
|
||||
footer: Word;
|
||||
end;
|
||||
|
||||
var
|
||||
FLAC__stream_encoder_new: function: Pointer cdecl;
|
||||
FLAC__stream_encoder_set_verify: function(encoder: Pointer; value: Boolean)
|
||||
: Boolean cdecl;
|
||||
FLAC__stream_encoder_set_compression_level: function(encoder: Pointer;
|
||||
value: Cardinal): Boolean cdecl;
|
||||
FLAC__stream_encoder_set_channels: function(encoder: Pointer; value: Cardinal)
|
||||
: Boolean cdecl;
|
||||
FLAC__stream_encoder_set_bits_per_sample: function(encoder: Pointer;
|
||||
value: Cardinal): Boolean cdecl;
|
||||
FLAC__stream_encoder_set_sample_rate: function(encoder: Pointer;
|
||||
value: Cardinal): Boolean cdecl;
|
||||
FLAC__stream_encoder_set_total_samples_estimate: function(encoder: Pointer;
|
||||
value: UInt64): Boolean cdecl;
|
||||
FLAC__stream_encoder_init_stream: function(encoder: Pointer;
|
||||
write_callback, seek_callback, tell_callback, metadata_callback: Pointer;
|
||||
client_data: Pointer): Integer cdecl;
|
||||
FLAC__stream_encoder_init_file: function(encoder: Pointer;
|
||||
filename: PAnsiChar; progress_callback: Pointer; client_data: Pointer)
|
||||
: Integer cdecl;
|
||||
FLAC__stream_encoder_process_interleaved: function(encoder: Pointer;
|
||||
const buffer; samples: Cardinal): Boolean cdecl;
|
||||
FLAC__stream_encoder_finish: function(encoder: Pointer): Boolean cdecl;
|
||||
FLAC__stream_encoder_delete: procedure(encoder: Pointer)cdecl;
|
||||
FLAC__stream_decoder_new: function: Pointer cdecl;
|
||||
FLAC__stream_decoder_init_stream: function(decoder: Pointer;
|
||||
read_callback, seek_callback, tell_callback, length_callback, eof_callback,
|
||||
write_callback, metadata_callback, error_callback: Pointer;
|
||||
client_data: Pointer): Integer cdecl;
|
||||
FLAC__stream_decoder_init_file: function(decoder: Pointer;
|
||||
filename: PAnsiChar; write_callback, metadata_callback, error_callback
|
||||
: Pointer; client_data: Pointer): Integer cdecl;
|
||||
FLAC__stream_decoder_get_channels: function(decoder: Pointer): Cardinal cdecl;
|
||||
FLAC__stream_decoder_get_bits_per_sample: function(decoder: Pointer)
|
||||
: Cardinal cdecl;
|
||||
FLAC__stream_decoder_process_until_end_of_stream: function(decoder: Pointer)
|
||||
: Boolean cdecl;
|
||||
FLAC__stream_decoder_finish: function(encoder: Pointer): Boolean cdecl;
|
||||
FLAC__stream_decoder_delete: procedure(encoder: Pointer)cdecl;
|
||||
DLLLoaded: Boolean = False;
|
||||
|
||||
implementation
|
||||
|
||||
var
|
||||
DLLHandle: THandle;
|
||||
|
||||
procedure Init;
|
||||
begin
|
||||
DLLHandle := LoadLibrary(PChar(ExtractFilePath(ParamStr(0)) +
|
||||
'libFLAC_dynamic.dll'));
|
||||
if DLLHandle >= 32 then
|
||||
begin
|
||||
@FLAC__stream_encoder_new := GetProcAddress(DLLHandle,
|
||||
'FLAC__stream_encoder_new');
|
||||
@FLAC__stream_encoder_set_verify := GetProcAddress(DLLHandle,
|
||||
'FLAC__stream_encoder_set_verify');
|
||||
@FLAC__stream_encoder_set_channels := GetProcAddress(DLLHandle,
|
||||
'FLAC__stream_encoder_set_channels');
|
||||
@FLAC__stream_encoder_set_compression_level :=
|
||||
GetProcAddress(DLLHandle, 'FLAC__stream_encoder_set_compression_level');
|
||||
@FLAC__stream_encoder_set_bits_per_sample :=
|
||||
GetProcAddress(DLLHandle, 'FLAC__stream_encoder_set_bits_per_sample');
|
||||
@FLAC__stream_encoder_set_sample_rate :=
|
||||
GetProcAddress(DLLHandle, 'FLAC__stream_encoder_set_sample_rate');
|
||||
@FLAC__stream_encoder_set_total_samples_estimate :=
|
||||
GetProcAddress(DLLHandle,
|
||||
'FLAC__stream_encoder_set_total_samples_estimate');
|
||||
@FLAC__stream_encoder_init_stream := GetProcAddress(DLLHandle,
|
||||
'FLAC__stream_encoder_init_stream');
|
||||
@FLAC__stream_encoder_init_file := GetProcAddress(DLLHandle,
|
||||
'FLAC__stream_encoder_init_file');
|
||||
@FLAC__stream_encoder_process_interleaved :=
|
||||
GetProcAddress(DLLHandle, 'FLAC__stream_encoder_process_interleaved');
|
||||
@FLAC__stream_encoder_finish := GetProcAddress(DLLHandle,
|
||||
'FLAC__stream_encoder_finish');
|
||||
@FLAC__stream_encoder_delete := GetProcAddress(DLLHandle,
|
||||
'FLAC__stream_encoder_delete');
|
||||
@FLAC__stream_decoder_new := GetProcAddress(DLLHandle,
|
||||
'FLAC__stream_decoder_new');
|
||||
@FLAC__stream_decoder_init_stream := GetProcAddress(DLLHandle,
|
||||
'FLAC__stream_decoder_init_stream');
|
||||
@FLAC__stream_decoder_init_file := GetProcAddress(DLLHandle,
|
||||
'FLAC__stream_decoder_init_file');
|
||||
@FLAC__stream_decoder_get_channels := GetProcAddress(DLLHandle,
|
||||
'FLAC__stream_decoder_get_channels');
|
||||
@FLAC__stream_decoder_get_bits_per_sample :=
|
||||
GetProcAddress(DLLHandle, 'FLAC__stream_decoder_get_bits_per_sample');
|
||||
@FLAC__stream_decoder_process_until_end_of_stream :=
|
||||
GetProcAddress(DLLHandle,
|
||||
'FLAC__stream_decoder_process_until_end_of_stream');
|
||||
@FLAC__stream_decoder_finish := GetProcAddress(DLLHandle,
|
||||
'FLAC__stream_decoder_finish');
|
||||
@FLAC__stream_decoder_delete := GetProcAddress(DLLHandle,
|
||||
'FLAC__stream_decoder_delete');
|
||||
DLLLoaded := Assigned(FLAC__stream_encoder_new) and
|
||||
Assigned(FLAC__stream_decoder_new);
|
||||
end
|
||||
else
|
||||
DLLLoaded := False;
|
||||
end;
|
||||
|
||||
procedure Deinit;
|
||||
begin
|
||||
if not DLLLoaded then
|
||||
exit;
|
||||
FreeLibrary(DLLHandle);
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
||||
Init;
|
||||
|
||||
finalization
|
||||
|
||||
Deinit;
|
||||
|
||||
end.
|
69
imports/JoJpegDLL.pas
Normal file
69
imports/JoJpegDLL.pas
Normal file
@@ -0,0 +1,69 @@
|
||||
unit JoJpegDLL;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
WinAPI.Windows,
|
||||
System.SysUtils, System.Classes;
|
||||
|
||||
const
|
||||
jojpeg_Size = 51320000;
|
||||
|
||||
jojpeg_Compress = 0;
|
||||
jojpeg_Decompress = 1;
|
||||
|
||||
jojpeg_enc_Input = 1;
|
||||
jojpeg_enc_Output1 = 2;
|
||||
jojpeg_enc_Output2 = 3;
|
||||
|
||||
jojpeg_dec_Input1 = 1;
|
||||
jojpeg_dec_Input2 = 3;
|
||||
jojpeg_dec_Output = 2;
|
||||
|
||||
var
|
||||
jojpeg_Init: function(p: Pointer; f_DEC: integer): integer stdcall;
|
||||
jojpeg_Quit: procedure(p: Pointer; f_DEC: integer)stdcall;
|
||||
jojpeg_Loop: function(p: Pointer; f_DEC: integer): integer stdcall;
|
||||
jojpeg_Getvalue: function(p: Pointer; f_DEC, typ: integer): Int64;
|
||||
jojpeg_Addbuf: procedure(p: Pointer; f_DEC: integer; buf: Pointer;
|
||||
bufsize, state: integer)stdcall;
|
||||
DLLLoaded: boolean = False;
|
||||
|
||||
implementation
|
||||
|
||||
var
|
||||
DLLHandle: THandle;
|
||||
|
||||
procedure Init;
|
||||
begin
|
||||
DLLHandle := LoadLibrary(PChar(ExtractFilePath(ParamStr(0)) +
|
||||
'jojpeg_dll.dll'));
|
||||
if DLLHandle >= 32 then
|
||||
begin
|
||||
@jojpeg_Init := GetProcAddress(DLLHandle, 'jojpeg_Init');
|
||||
@jojpeg_Quit := GetProcAddress(DLLHandle, 'jojpeg_Quit');
|
||||
@jojpeg_Loop := GetProcAddress(DLLHandle, 'jojpeg_Loop');
|
||||
@jojpeg_Getvalue := GetProcAddress(DLLHandle, 'jojpeg_Getvalue');
|
||||
@jojpeg_Addbuf := GetProcAddress(DLLHandle, 'jojpeg_Addbuf');
|
||||
DLLLoaded := Assigned(jojpeg_Init);
|
||||
end
|
||||
else
|
||||
DLLLoaded := False;
|
||||
end;
|
||||
|
||||
procedure Deinit;
|
||||
begin
|
||||
if not DLLLoaded then
|
||||
exit;
|
||||
FreeLibrary(DLLHandle);
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
||||
Init;
|
||||
|
||||
finalization
|
||||
|
||||
Deinit;
|
||||
|
||||
end.
|
@@ -69,6 +69,8 @@ var
|
||||
LZ4F_compressFrame: function(dstBuffer: Pointer; dstCapacity: size_t;
|
||||
srcBuffer: Pointer; srcSize: size_t; preferencesPtr: PLZ4F_preferences_t)
|
||||
: size_t cdecl;
|
||||
LZ4_compressHC2: function(const src: Pointer; dst: Pointer; srcSize: Integer;
|
||||
compressionLevel: Integer): Integer cdecl;
|
||||
LZ4F_compressFrameBound: function(srcSize: size_t;
|
||||
preferencesPtr: PLZ4F_preferences_t): size_t cdecl;
|
||||
LZ4F_createDecompressionContext: function(out dctxPtr: LZ4F_dctx;
|
||||
@@ -104,6 +106,7 @@ begin
|
||||
@LZ4_compress_default := GetProcAddress(DLLHandle, 'LZ4_compress_default');
|
||||
@LZ4_compress_fast := GetProcAddress(DLLHandle, 'LZ4_compress_fast');
|
||||
@LZ4_compress_HC := GetProcAddress(DLLHandle, 'LZ4_compress_HC');
|
||||
@LZ4_compressHC2 := GetProcAddress(DLLHandle, 'LZ4_compressHC2');
|
||||
@LZ4F_compressFrame := GetProcAddress(DLLHandle, 'LZ4F_compressFrame');
|
||||
@LZ4F_compressFrameBound := GetProcAddress(DLLHandle,
|
||||
'LZ4F_compressFrameBound');
|
||||
|
28
imports/LZMADLL.pas
Normal file
28
imports/LZMADLL.pas
Normal file
@@ -0,0 +1,28 @@
|
||||
unit LZMADLL;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
WinAPI.Windows,
|
||||
System.SysUtils;
|
||||
|
||||
type
|
||||
PFL2_inBuffer = ^FL2_inBuffer;
|
||||
|
||||
FL2_inBuffer = record
|
||||
src: Pointer;
|
||||
size: size_t;
|
||||
pos: size_t;
|
||||
end;
|
||||
|
||||
PFL2_outBuffer = ^FL2_outBuffer;
|
||||
|
||||
FL2_outBuffer = record
|
||||
dst: Pointer;
|
||||
size: size_t;
|
||||
pos: size_t;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
67
imports/PackJPGDLL.pas
Normal file
67
imports/PackJPGDLL.pas
Normal file
@@ -0,0 +1,67 @@
|
||||
unit PackJPGDLL;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
WinAPI.Windows,
|
||||
System.SysUtils, System.Classes;
|
||||
|
||||
const
|
||||
pjglib_file = 0;
|
||||
pjglib_memory = 1;
|
||||
pjglib_handle = 2;
|
||||
|
||||
var
|
||||
pjglib_convert_stream2stream: function(msg: PAnsiChar): Boolean cdecl;
|
||||
pjglib_convert_file2file: function(ain, aout, msg: PAnsiChar): Boolean cdecl;
|
||||
pjglib_convert_stream2mem: function(out_file: PPAnsiChar; out_size: PCardinal;
|
||||
msg: PAnsiChar): Boolean cdecl;
|
||||
pjglib_init_streams: procedure(in_src: Pointer; in_type: Integer;
|
||||
in_size: Integer; out_dest: Pointer; out_type: Integer)cdecl;
|
||||
pjglib_version_info: function: PAnsiChar cdecl;
|
||||
pjglib_short_name: function: PAnsiChar cdecl;
|
||||
DLLLoaded: Boolean = False;
|
||||
|
||||
implementation
|
||||
|
||||
var
|
||||
DLLHandle: THandle;
|
||||
|
||||
procedure Init;
|
||||
begin
|
||||
DLLHandle := LoadLibrary(PChar(ExtractFilePath(ParamStr(0)) +
|
||||
'packjpg_dll.dll'));
|
||||
if DLLHandle >= 32 then
|
||||
begin
|
||||
@pjglib_convert_stream2stream := GetProcAddress(DLLHandle,
|
||||
'pjglib_convert_stream2stream');
|
||||
@pjglib_convert_file2file := GetProcAddress(DLLHandle,
|
||||
'pjglib_convert_file2file');
|
||||
@pjglib_convert_stream2mem := GetProcAddress(DLLHandle,
|
||||
'pjglib_convert_stream2mem');
|
||||
@pjglib_init_streams := GetProcAddress(DLLHandle, 'pjglib_init_streams');
|
||||
@pjglib_version_info := GetProcAddress(DLLHandle, 'pjglib_version_info');
|
||||
@pjglib_short_name := GetProcAddress(DLLHandle, 'pjglib_short_name');
|
||||
DLLLoaded := Assigned(pjglib_init_streams) and
|
||||
Assigned(pjglib_convert_stream2stream);
|
||||
end
|
||||
else
|
||||
DLLLoaded := False;
|
||||
end;
|
||||
|
||||
procedure Deinit;
|
||||
begin
|
||||
if not DLLLoaded then
|
||||
exit;
|
||||
FreeLibrary(DLLHandle);
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
||||
Init;
|
||||
|
||||
finalization
|
||||
|
||||
Deinit;
|
||||
|
||||
end.
|
53
imports/TTADLL.pas
Normal file
53
imports/TTADLL.pas
Normal file
@@ -0,0 +1,53 @@
|
||||
unit TTADLL;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
WinAPI.Windows,
|
||||
System.SysUtils, System.Classes;
|
||||
|
||||
var
|
||||
tta_encode: function(const src: Pointer; srcSize: PInteger; dst: Pointer;
|
||||
dstCapacity: PInteger): Boolean cdecl;
|
||||
tta_decode: function(const src: Pointer; srcSize: Integer; dst: Pointer;
|
||||
dstCapacity: PInteger): Boolean cdecl;
|
||||
tta_getsize: function(const src: Pointer; srcSize: Integer;
|
||||
headerSize: PInteger): Integer cdecl;
|
||||
DLLLoaded: Boolean = False;
|
||||
|
||||
implementation
|
||||
|
||||
var
|
||||
DLLHandle: THandle;
|
||||
|
||||
procedure Init;
|
||||
begin
|
||||
DLLHandle := LoadLibrary(PChar(ExtractFilePath(ParamStr(0)) +
|
||||
'libtta_dll.dll'));
|
||||
if DLLHandle >= 32 then
|
||||
begin
|
||||
@tta_encode := GetProcAddress(DLLHandle, 'encode');
|
||||
@tta_decode := GetProcAddress(DLLHandle, 'decode');
|
||||
@tta_getsize := GetProcAddress(DLLHandle, 'getsize');
|
||||
DLLLoaded := Assigned(tta_encode) and Assigned(tta_decode);
|
||||
end
|
||||
else
|
||||
DLLLoaded := False;
|
||||
end;
|
||||
|
||||
procedure Deinit;
|
||||
begin
|
||||
if not DLLLoaded then
|
||||
exit;
|
||||
FreeLibrary(DLLHandle);
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
||||
Init;
|
||||
|
||||
finalization
|
||||
|
||||
Deinit;
|
||||
|
||||
end.
|
Reference in New Issue
Block a user