BSOne.SFC/Tocsg.Module/EtcCtrl/DLL_EtcCtrl/EtcCtrl.dpr

40 lines
606 B
Plaintext

library EtcCtrl;
uses
System.SysUtils,
Winapi.Windows,
System.Classes,
EtcHook in 'EtcHook.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.