W
WorldCreater
Unregistered / Unconfirmed
GUEST, unregistred user!
function TForm1.TestHook(code: integer; wparam: WPARAM; lparam: LPARAM):LRESULT stdcall;<br>begin<br>end;<br><br>procedure TForm1.HookBtnClick(Sender: TObject)<br> Hook := SetWindowsHookEx( WH_KEYBOARD, @TForm1.TestHook, Handle, 0 );<br> //hook好象总是为0,没有调用成功<br>end;<br><br>procedure TForm1.UnHookBtnClick(Sender: TObject)<br>begin<br> UnHookWindowsHookEx( Hook ); <br>end;<br>