File 'hook.dpr' is source of the DLL.
You need open it using "Open project" and compile it.
The result will be hook.dll
The main application should contain the following code:
(When the main application installs global hook,
the hook.dll will be loaded on every application)
Código Delphi
[-]
function InstallHook: PNConTildeData; stdcall; external 'hook.dll';
function UninstallHook: Boolean; stdcall; external 'hook.dll';
procedure TForm1.FormCreate(Sender: TObject);
begin
InstallHook;
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
UninstallHook;
end;
I have attached the working example.