mIRC Home    About    Download    Register    News    Help

Print Thread
#260061 25/02/17 04:52 AM
Joined: Feb 2003
Posts: 106
L
Vogon poet
OP Offline
Vogon poet
L
Joined: Feb 2003
Posts: 106
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


-
Just because it never happened doesn't mean it isn't true.
Joined: Dec 2002
Posts: 5,411
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,411
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.

Joined: Feb 2003
Posts: 106
L
Vogon poet
OP Offline
Vogon poet
L
Joined: Feb 2003
Posts: 106
I am exceedingly grateful for your input, Khaled. May a thousand elephants fertilize your pumpkin patch with their droppings.


-
Just because it never happened doesn't mean it isn't true.
Joined: Sep 2015
Posts: 101
Vogon poet
Offline
Vogon poet
Joined: Sep 2015
Posts: 101
Can you send me your dll please? I want this dll for my scripts. Thank you.


Link Copied to Clipboard