
20.11.2009, 19:24
|
|
Banned
Регистрация: 03.11.2009
Сообщений: 112
С нами:
8694756
Репутация:
17
|
|
Код:
library DisableKB;
uses
Forms,
Windows,
Messages,
HookCommon in 'HookCommon.pas';
{$J+}
const
Hook: HHook = 0;
WH_KEYBOARD_LL = 13;
{$J-}
{$R *.res}
function HookProc(nCode: Integer; MsgID: WParam; Data: LParam): LResult; stdcall;
begin
Result := -1;
end;
procedure DisableKB; stdcall;
begin
if Hook = 0 then Hook:=SetWindowsHookEx(WH_KEYBOARD_LL,@HookProc,HInstance,0);
end;
procedure EnableKB; stdcall;
begin
UnhookWindowsHookEx(Hook);
Hook:=0;
end;
exports
DisableKB, EnableKB;
begin
end.
unit HookCommon;
interface
uses Windows;
procedure DisableKB; stdcall;
procedure EnableKB; stdcall;
implementation
procedure DisableKB; stdcall; external 'disablekb.DLL';
procedure EnableKB; stdcall; stdcall; external 'disablekb.DLL';
initialization
end.
Последний раз редактировалось slesh; 21.11.2009 в 10:52..
Причина: [code] КОД [/code]
|
|
|