Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Advantages and disadvantages from Hooks and getasynchronouskeystate

Hello HF,

the title is quite literally the question, I would like to learn more about the advantages of using hooks instead of the getasynckeystate method. I read that using hooks is more performance friendly, but is performance still an issue on modern systems?
With hooks, are we talking userland or kernelland?
also in what language ? c#? there's some nice classes to use if c#
(Dec 30, 2014 02:41 PM)Juggernauten Wrote:  With hooks, are we talking userland or kernelland?

Probably userland. And my preferred language would be c++ or c#.
I personaly don't like hooking in userland (Kernelland is even worse since it doesnt really work anymore), so I would go with getasynckeystate.
(Dec 30, 2014 05:39 PM)Juggernauten Wrote:  I personaly don't like hooking in userland (Kernelland is even worse since it doesnt really work anymore), so I would go with getasynckeystate.

He is not talking about hooking any windows API.

He is talking about the functions within kenel32.dll

CallNextHookEx
SetWindowsHookEx

OP, take my advice and use these functions, do not use GetAsyncKeyState. It is very unreliable and used wrong most often. Search the forums for source codes!


Possibly Related Threads...
Thread / Author Replies Views Last Post
by psycheuserAug 29, 2026 04:06 PM 4 136 Aug 29, 2026 04:06 PM
Last Post: psycheuser
by FeatureBugJul 22, 2015 03:39 AM 5 218 Jul 22, 2015 03:39 AM
Last Post: FeatureBug
by mrnikbobjeffApr 5, 2015 08:58 AM 0 147 Apr 5, 2015 08:58 AM
Last Post: mrnikbobjeff