Page 1 of 1

how hook in my .exe without use one dll?

Posted: Sat Jun 07, 2008 1:53 pm
by break
I would example

tkssssss:)

Posted: Sun Jun 08, 2008 3:18 am
by iconic
This is the madRemote section of the forum, I think you want to visit the madCodeHook area. Anyhow, do you mean hook in your own process executable? If this is the case madCodeHook.HookAPI() and madCodeHook.HookCode() is all you need.

--Iconic

oh sorry icon

Posted: Sun Jun 08, 2008 12:53 pm
by break
Friend..

the examples of madshi are all with dll ok?

I need only how change to hook in my own .exe

only my .exe to never killed

I need protect my program com terminateprocess e exitprocess whithout dll
only :)


Do u have one example?
tks

Posted: Thu Jul 03, 2008 8:23 pm
by madshi
Sorry for the late reply!

In the NT family doing API hooking only ever affects the current process. But if the user e.g. uses the task manager to terminate your application then TerminateProcess is called in the context of the task manager and NOT in the context of your process. So in order to stop the user from doing that you'd need to hook the TerminateProcess API in the context of the task manager. Now it's theoretically possible to do this without using a dll, but it'd be difficult as hell. So you better stop thinking about realizing this without using a dll.

Re: how hook in my .exe without use one dll?

Posted: Thu Dec 23, 2010 7:29 pm
by iftijafar
By the way, you can have many global hooks, not just one. The biggest consideration is that the hook code needs to be very fast/efficient because it is getting control for every keystrok