Hi everybody,

I am working on a keyboard loggin program, which I use
a keyboard hook (WH_KEYBOARD using SetWindowsHookEx).
Everything works fine until I try to write the keystrokes to
a file: no matter what I do, opening/writing/closing the file
in the call back KeyboardProc will never work.

But if I create/open the file somewhere else (e.g. in the API which
I called it HookKeyboard, all file operations work).

Anyone has a solution/answer to my problem? Your help
is really appreciated.

Thanx!
Posted on 2002-04-27 10:04:26 by congyuen
Maybe the file functions are trashing eis, edi and ebx are you preserving these registers?
Posted on 2002-04-27 10:45:45 by Kudos

Maybe the file functions are trashing eis, edi and ebx are you preserving these registers?


Thanks a lot 4 your suggestion! Anyway, I still haven't tried it
out. If only I have a few more hours everyday...
Posted on 2002-04-28 07:08:35 by congyuen