Hi all

im very new to this, im trying to understand stuff.. i tried to search all the foruns and google but i didnt find out how to do this...

The problem is... I need to protect a process of being terminated.... i have writed an proggie that finds its window get his id and terminate it with terminateprocess

but i need to protect the program from terminateprocess ... like this

1-) process runing ( like explorer.exe or whatever )
2-) if something tries to kill it or restart it ( like terminateprocess ) the program intercept the kill or restart like giving READONLY access to the process

i dont know if i explain it well....

thanks for your help.
Posted on 2004-09-10 15:44:26 by alex-izumi
i am not sure, but hooking TerminateProcess api call (or TerminateThread if needed) should be one of the ways.
Posted on 2004-09-10 15:58:26 by arafel
yes i have looked around for API hooking ... but i didnt find any example on hooking terminateprocess.... can you point me with some example please?
Posted on 2004-09-10 22:57:17 by alex-izumi
Here is a masm example of hooking MessageBoxA api call http://www.geocities.com/chuonyuen_ooi/files/MsgboxHack.zip. It can be easily converted to hook anyother functions.
Posted on 2004-09-11 05:43:41 by arafel
thank you for your help i ll take a look at it. :-D
Posted on 2004-09-11 07:48:11 by alex-izumi