1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
unit SIEDIL01;
interface
uses
Windows, Classes, Sysutils, sinlibl01, forms, dbtables;
type
Tthread_edit = class(TThread)
private
{ Déclarations privées }
ch : string;
ImprimerThread : TImprimerThread;
protected
procedure Execute; override;
public
property Terminated;
constructor create(pserial, pch, pnompr : string);
end;
implementation
//-------------------------------------------------------------------------
constructor Tthread_edit.create(pserial, pch, pnompr: string);
begin
UHandle := 0;
FreeOnTerminate := true;
Priority := tpNormal;
ch := pch;
inherited create(false);
end;
//-------------------------------------------------------------------------
procedure Tthread_edit.Execute;
begin
try
try
retour := '';
UHandle := LoadLibrary('siimpd00.dll');
if UHandle <> 0 then begin
@ImprimerThread := GetProcAddress(UHandle, 'Imprimer');
if @ImprimerThread <> nil then begin
ImprimerThread(ch, retour) ;
end;
end;
except
end;
finally
FreeLibrary(UHandle);
end;
end;
//------------------------------------------------------------------------- |
Partager