c++ / delphi package - dll injection and api hooking


Postby Azmodeus » Mon May 03, 2004 7:44 am

It seems that since the dll is loaded into the memory space of all DLL's anyway (if using system-wide injection) that it would be very easy without any additional system performance to be able to create hooks similar to the SetWindowsHookEx function.

The reason I ask, is that whe I use SetWindowsHookEx(WH_GETMESSAGE,x,x,0) it drastically slows down background processing of desktop windows.

I know it is not the hook function, because I am just forwarding the call using CallNextHookEx.

So, does any of your (madshi) apps support anything to grab the keyboard/mouse messages that I have missed?
Posts: 60
Joined: Mon May 03, 2004 7:41 am

Postby madshi » Tue May 04, 2004 9:42 am

Hooking messages can cost quite much performance, because messages are used so much in Windows. I'm not sure whether madCodeHook installed message hooks would be faster than SetWindowsHookEx. I doubt it, but I'm not sure.

I generally recommend using SetWindowsHookEx if it offers the functionality you need. It is always recommend to use documented stuff if possible.

That doesn't mean that madCodeHook couldn't do the very same thing. Probably it could.
Site Admin
Posts: 9883
Joined: Sun Mar 21, 2004 5:25 pm

Return to madCodeHook

Who is online

Users browsing this forum: No registered users and 6 guests