Click to See Complete Forum and Search --> : System level keystroke capture


Larry Woods
May 27th, 1999, 08:14 AM
I want to get system-level control of keystrokes and mouse position. I would prefer to use MFC because I am not proficient in C++ at the system level. Any source of sample code would be appreciated also.

I apoligize in advance because I am SURE that the above question has been asked in the past. I just can't find the answer!

Thanks.


Larry Woods
l.woods, inc.
Scottsdale, Arizona

May 28th, 1999, 10:32 PM
Yea... you would use a System Hook.. u can search for that in MSDN or there is a sample project on CodeGuru, i believe

Vali
June 13th, 1999, 10:03 PM
System wide hook will work correctly under NT and under Win9x excpet that in a DOS box (under Win9x), system wide hooks do not work. If this is important to you, you must write a VxD that hooks VKD.VXD services. One of these services allows you to get into a chain that is called whenever any key is pressed. You can then monitor all keys, reject a key (prevent windows from propagating that key any further), etc.

Remember, under 9x only, you must write a VxD. Although you can write a SYS (NT) driver under NT to do the same, the system wide hook actually works under DOS boxes under NT. Only caveat is that someone can (and will) write a SYS driver that can reject keys under NT long before your hook has a chance to see it.

Low Level programming RULES!!!

Hope this helps.

Vali

balak yap
June 14th, 1999, 12:43 AM
Mind to tell me how to write and compile a VxD?
Or where can i get more information about this?
Thanks

Hello World!!!

Vali
June 15th, 1999, 11:43 AM
Writting a VxD is a complicated and involved undertaking. Your best bet is to start at DDK (Device Driver Kit) from MS (also ships as part of the MSDN subscription from MS). Also look up various tools from vendors liek Vireo (VTOOLSD) which offer class libraies to simplify writting VxDs. Karen Hazzah has a book called "Writting Windows Device Drivers" that you may also want to look at. Unfortunately, this is a topic which cannot be covered in a mail.

Send me a mail if you need more info
vali.ali@compaq.com
Vali Ali