Counterargument: capture Windows keyboard movements with keyboard hooks

Source: Internet
Author: User
     
I found this article on the Internet and followed the steps below. It did not fully achieve the expected results and did not release the hook.

After many experiments, for creating "standard static link mfc dll" or "standard dynamic link MFCDLL" in VC, messages can only be sent in the window of the program that calls the DLL, hooks can be used to hook messages. Otherwise, if a message is sent in a window other than the calling program, the hook will not be able to hook the message. To hook messages sent in all windows, you must create an "extended mfc dll ".

The above is only my own test result. I still don't understand it as to whether it is correct or why. You are welcome to discuss it and give me an answer.





Note: I have created "extended MFC DLL" and exported class interfaces. Functions exported from non-"extended MFC DLL" are connected.
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.