HOOKU.PAS
上传用户:mjqmds
上传日期:2022-05-05
资源大小:2827k
文件大小:1k
源码类别:

DirextX编程

开发平台:

Delphi

  1. unit HookU;
  2. interface
  3. uses
  4.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  5.   StdCtrls, ExtCtrls;
  6. type
  7.   TForm1 = class(TForm)
  8.     Button1: TButton;
  9.     Button2: TButton;
  10.     Memo1: TMemo;
  11.     procedure Button1Click(Sender: TObject);
  12.     procedure Button2Click(Sender: TObject);
  13.     procedure Timer1Timer(Sender: TObject);
  14.   private
  15.     { Private declarations }
  16.   public
  17.     { Public declarations }
  18.   end;
  19. var
  20.   Form1: TForm1;
  21. implementation
  22. {$R *.DFM}
  23. function EnableHotKeyHook: BOOL; external 'HKTEST.DLL';
  24. function DisableHotKeyHook: BOOL; external 'HKTEST.DLL';
  25. procedure TForm1.Button1Click(Sender: TObject);
  26. begin
  27.   if EnableHotKeyHook then
  28.     ShowMessage('Keyboard Hook');
  29. end;
  30. procedure TForm1.Button2Click(Sender: TObject);
  31. begin
  32.   if DisableHotKeyHook then
  33.     ShowMessage('Keyboard Hook');
  34. end;
  35. procedure TForm1.Timer1Timer(Sender: TObject);
  36. Var
  37.     P:Pointer;
  38. begin
  39. end;
  40. end.