www.pudn.com > SPYQQ3.rar > InsertHook.pas
unit InsertHook; interface procedure InsertHookOn; procedure InsertHookOff; implementation uses Windows; var InsertHookHandle: DWORD; function InsertHookPro(nCode: Integer; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall; begin Result:= CallNextHookEx(InsertHookHandle, nCode, wParam, lParam); end; procedure InsertHookOn; begin InsertHookHandle := SetWindowsHookEx(WH_GETMESSAGE, @InsertHookPro, HInstance, 0); end; procedure InsertHookOff; begin UnHookWindowsHookEx(InsertHookHandle); end; end.