HOOKU.PAS
上传用户:mjqmds
上传日期:2022-05-05
资源大小:2827k
文件大小:1k
- unit HookU;
- interface
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls, ExtCtrls;
- type
- TForm1 = class(TForm)
- Button1: TButton;
- Button2: TButton;
- Memo1: TMemo;
- procedure Button1Click(Sender: TObject);
- procedure Button2Click(Sender: TObject);
- procedure Timer1Timer(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- Form1: TForm1;
- implementation
- {$R *.DFM}
- function EnableHotKeyHook: BOOL; external 'HKTEST.DLL';
- function DisableHotKeyHook: BOOL; external 'HKTEST.DLL';
- procedure TForm1.Button1Click(Sender: TObject);
- begin
- if EnableHotKeyHook then
- ShowMessage('Keyboard Hook');
- end;
- procedure TForm1.Button2Click(Sender: TObject);
- begin
- if DisableHotKeyHook then
- ShowMessage('Keyboard Hook');
- end;
- procedure TForm1.Timer1Timer(Sender: TObject);
- Var
- P:Pointer;
- begin
- end;
- end.