PDA

Click to See Complete Forum and Search --> : Creating System Wide Hook


Geronimo
Feb 17th, 2001, 08:31 AM
How in the world do you make a Hook that will intercept pressed keys system wide to run a few commands before they are sent to the active application?

heavenhell
Feb 17th, 2001, 09:04 AM
You require a Dll thats written in C to make the hook procedure accessible to all threads, which mean placing the hook procedure in a DLLİ I'm also looking for a DLL that i can use cause i dont know Cİ

Geronimo
Feb 17th, 2001, 11:49 AM
ok well I took your advice and got me a dll off a program at PSC that might work. thx

heavenhell
Feb 17th, 2001, 11:42 PM
If you find a working dll, do you mind sending it to meİ Thanks

Lord Orwell
Feb 19th, 2001, 04:16 AM
visit http://forums.vb-world.net/showthread.php?s=&threadid=55173 It contains complete code in visual basic to capture keys.

If you are just interested in detecting something like ctrl-x or whatever, read up on the GetAsyncKeyState function. Despite the win32 documentation on it, it actually works globally, not just while your app has focus. [edited to fix link :)]

heavenhell
Feb 19th, 2001, 09:01 PM
Yes, it work goballyİ If you need to constanly check for which key is pressed, do you use a timer or is there a more efficient and accurate way to do it