For more information about keyboard hooks, see Delphi, Windows SDK, and API.
Http://www.delphi2007.net/DelphiAPI/html/delphi_20061122084602187.html
Function starthookmouse: Boolean;
Const
Wh_mouse_ll = 14;
Begin
If hhklowlevelmouse = 0 then hhklowlevelmouse: = setwindowshookex (wh_mouse_ll, lowlevelmouseproc, hinstance, 0 );
// If hhklowlevelmouse = 0 then hhklowlevelmouse: = setwindowshook (wh_mouse_ll, @ lowlevelmouseproc );
Result: = (hhklowlevelmouse <> 0 );
End;
Put this section in your own Program It is not in the DLL, and global hooks can be implemented in XP, but in
The hook in 98 is invalid. Why ????
Master
Kernel32.dll?
Function starthookmouse: Boolean;
Begin
If hhklowlevelmouse = 0 then hhklowlevelmouse: = setwindowshookex (wh_mouse_ll, lowlevelmouseproc, hinstance, 0 );
Result: = (hhklowlevelmouse <> 0 );
End;
Const
Wh_keyboard_ll = 13;
Wh_mouse_ll = 14;
The hook in 98 is invalid!