For more information about keyboard hooks

Source: Internet
Author: User
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!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.