Click here to Skip to main content
15,884,176 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
If anyone could show me a simple easy hook tutorial it would be much appreciated:

the program hooks chrome.exe or calc.exe and outputs every drawed text. (in case of calc.exe: MC MR MS M+ M- Ce C 7 8 9 etc. )

thank you
Posted
Comments
BillWoodruff 13-Dec-14 23:47pm    
CodeProject has several excellent articles on how to implement Global Hooks in WinForms, C#. Just search ! Hooking Text rendered by an equivalent to the WinForms Paint event by some arbitrary Application ... I'm not sure if that's possible.

1 solution

There cannot be an "easy tutorial" because of one very obvious reason: Window hooks are not easy to work with, notoriously hard to debug, and so on. Chances are, the easiest tutorials would be the worst, in terms of getting to the results you want.

And I don't recommend doing the works you are planning to do at all. Why? I'll explain.

Calculator? It's much easy to implement the calculator by yourself from scratch, especially such a sloppy one as calc.exe. Chrome? It has the plug-in API which allows you to hook browser's events in much easier way. To hook up all events in any arbitrary applications? It's theoretically impossible in general case, and certainly impossible with hooks. Why so? Because some application (a wide class of them, actually) do a lot of things bypassing Windows API and events. One example is WPF applications.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900