40 lines
612 B
Plaintext
40 lines
612 B
Plaintext
library PrintMark;
|
|
|
|
|
|
uses
|
|
System.SysUtils,
|
|
Winapi.Windows,
|
|
System.Classes,
|
|
PrintHook in 'PrintHook.pas',
|
|
GlobalDefine in '..\LIB_Common\GlobalDefine.pas';
|
|
|
|
{$R *.res}
|
|
|
|
var
|
|
PrintHook: TPrintHook = nil;
|
|
|
|
procedure DLLEntryPoint(dwReason: DWORD);
|
|
begin
|
|
case dwReason of
|
|
DLL_PROCESS_ATTACH :
|
|
begin
|
|
PrintHook := TPrintHook.Create;
|
|
end;
|
|
|
|
DLL_PROCESS_DETACH :
|
|
begin
|
|
try
|
|
if Assigned(PrintHook) then
|
|
FreeAndNil(PrintHook);
|
|
except
|
|
//
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
begin
|
|
DllProc := @DLLEntryPoint;
|
|
DLLEntryPoint(DLL_PROCESS_ATTACH);
|
|
end.
|