I have been trying to make Global Keyboard hook program in visual C++ that writes keystrokes to a file "log.txt"..I am new to windows programming and i have gone through the msdn library to get an understanding of hooks....I think i have understood the concept theoretically but when i implement the code, it doesn't seem towork..The compiler doesn't show any error in both the DLL file and EXE file....Moreover the text file "log.txt" never gets created...
Here are the code files
First the DLL file:
Why are you using dll to install WH_KEYBOARD_LL type hook. This type of hook is global; period. You can install this hook in your executable and it will work like a charm.
On the other hand, I would follow Igor’s advice.
There are only 10 types of people in the world: Those who understand binary and those who do not.