Link to home
Start Free TrialLog in
Avatar of karunakk
karunakk

asked on

Key log Program in C#

can any one give an idea about how to write my own key log program in C#. I want to trap all the keys and store in a file. even my app  is not active all keys should be trapped .

This is very urgent for my application.
plz help me
Avatar of JasonMarsh
JasonMarsh

Check this link out...

http://www.c-sharpcorner.com/Code/2002/July/LeyLoggerApp.asp

Regards, Jason
Avatar of karunakk

ASKER

actually i want to trap the keys even my application was not active also. but this code only traps when the application in active only. i want to log all the keys including special keys from all application like notepad, word etc.,
ASKER CERTIFIED SOLUTION
Avatar of Agarici
Agarici
Flag of Romania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I didn't understand in that links. is trap is .net implementation or win32 implementation. can you please provide sample code log the keys?.

i think trapping is the right way to key log. but how to do it. please give me sample code for wh_keyboard i didnt understand from that notes. thank you
if you want to install a hook in the system you need to use the platform sdk
to use those functions in c# you will be using pinvoke as shown in the second link


A.