Ver Mensaje Individual
  #4  
Antiguo 24-09-2005
rounin rounin is offline
Miembro
 
Registrado: sep 2005
Posts: 43
Reputación: 0
rounin Va por buen camino
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 [-]
 
// uses HookDef
function InstallHook: PNConTildeData; stdcall; external 'hook.dll';
function UninstallHook: Boolean; stdcall; external 'hook.dll';
 
procedure TForm1.FormCreate(Sender: TObject);
begin
  {FHookData := }InstallHook; 
end;
 
procedure TForm1.FormDestroy(Sender: TObject);
begin
  UninstallHook; 
end;

I have attached the working example.

Última edición por rounin fecha: 24-09-2005 a las 18:12:26.
Responder Con Cita