Trying to write a keylogger are we? ;-] Anyway though, yes. Using getasynckeystate is a good way but not the best. You will find it quite annoying to use GetAs... for logging keystrokes, since it requires a hughe(or small) switch statement and a sleep command in order to avoid 100% cpu usage which will fail on loggin every keystroke if the user is a really fast typer. I would recommend a keyboard hook though, but if you feel you deserve an example I can write a GetAsync... for you.
Time is an illusion perpetuated by the manufacturers of space. Anasazi @ RESiSTANCE
|