hi everybody!

I am working on a keyboard logger using a keyboard hook.

Everything works fine until I finally tried to log those keystrokes
to a file. GetLastError returns error 161 (ERR_BAD_PATH).
What is the problem ('cos I am very sure that the path is OK)

my file path is: LogFile db "C:\Windows\Desktop\a.txt",0
(is that a problem??)

I tried to use CreateFile in the KeyboardProc, it never works.
but if cut and paste that Invoke CreateFile...... in my
HookKeyboard function, the function never fails. what on
earth is happening?

Any help/suggestions/comments, please? Your help is highly

Posted on 2002-04-29 08:28:09 by congyuen