Link to home
Start Free TrialLog in
Avatar of Lukasz Lach
Lukasz Lach

asked on

Global function hook...

My question is how to globally hook some function from any other dll (kernel32, user32, winsock). I watched madCodeHook but it allows me only to hook a function in one process only. And it would be fine if it worked on W2k/XP too ;-))

I offer +500 points for a complete solution...
Avatar of JimMcKeeth
JimMcKeeth

So you want to hook into the Windows API globally?  Sounds like a RootKit.  ;-)  Check out http://rootkit.com/ for some examples, with source code.  Not in Delphi, but the API's are the same.
Avatar of Lukasz Lach

ASKER

Madshi i know you can ;-)
Help...
ASKER CERTIFIED SOLUTION
Avatar of Madshi
Madshi

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It is realy cool, but I have one problem while compiling the dll:

begin
  DllProc := @HandleEvents;
  DllProc(DLL_PROCESS_ATTACH); // -> Missing operator or semicolon
end.

I'm using D5, in my case
var DllProc: Pointer
 in SysUtils
Oh, interesting, thanks for the hint. Then please change it to:

HandleEvents(DLL_PROCESS_ATTACH);

I'll change it in my sources, too.