Click here to Skip to main content
15,888,521 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone,

I am making a key logger using the set Windows key hook. I have been stuck in a weird problem with the hooks.

My code is working fine when I try typing in notepad or any thing like that, but whenever I type something on the Internet i.e. in the address bar or chatting every character is repeated twice.

I have debugged the code and get to know that Windows key hook is sending the message twice in case I am typing on the Internet browsers.

So why is it sending the message twice in case of the Internet? Does anybody have any clue regarding this?

It would be very helpful for me.
Posted
Updated 19-Nov-11 22:56pm
v2
Comments
Sergey Alexandrovich Kryukov 20-Nov-11 19:49pm    
As I never faced with such thing, and a Web browser is nothing but a regular application, no different from any other, its hard to say anything without seeing you code. Could you make a simplest possible code sample, minimalistic, just to demonstrate the problem?

By the way, does it happen in all browsers or just one; which one? Please check up.
--SA

1 solution

Check if the code parameter in the keyboard hook procedure is HC_ACTION.
Do the processing only if code is HC_ACTION.
 
Share this answer
 
Comments
vaibhavbvp 22-Nov-11 3:44am    
thanks a lot :)..it worked...previously i was doing the the processing if code>=0;now it is resolved

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



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