mIRC Homepage
Posted By: lerpicus Keyboard hook for mIRC - 25/02/17 04:52 AM
I am a hobbyist programmer who started with Turbo Pascal and currently dabble in the arcane arts with Delphi 7. I recently had success with programming some simple dlls, and would like to investigate a dll that intercepts keyboard activity, just for the halibut. There are many examples on the web, but they all seem to be basically general keyloggers, with no ability to focus on a particular program such as I would like the option to do, such as "Enter the window handle here." Any pointers to such a template?

Cheers
Posted By: Khaled Re: Keyboard hook for mIRC - 25/02/17 11:47 AM
You will need to use FindWindow() to get the window handle of the application's main window. You can then use that with GetWindowThreadProcessId() to get the application's thread id and then use that in the call to SetWindowsHookEx(), in the examples you have found, to monitor just that application.
Posted By: lerpicus Re: Keyboard hook for mIRC - 26/02/17 12:51 AM
I am exceedingly grateful for your input, Khaled. May a thousand elephants fertilize your pumpkin patch with their droppings.
Posted By: klez Re: Keyboard hook for mIRC - 31/05/17 05:39 PM
Can you send me your dll please? I want this dll for my scripts. Thank you.
© mIRC Discussion Forums