Link to home
Start Free TrialLog in
Avatar of fengtao2000
fengtao2000

asked on

How to prevent user and other apps killing my app?

My question separates two parts:

1. I want to prevent user killing my app.
I use RegisterServiceProcess() on Win9x, it works ok.
I use SetEntriesInAcl() and SetSecurityInfo() to remove the PROCESS_TERMINATE permission from my app, it works on WinNT/2000, but doesn't work on WinXP :-(

2. I want to prevent other apps killing my app.
I have no idea about this now, maybe hook api is a choice, but I want a clean method, if you have thought something, please help me.

Best Regards,
Fengtao
Avatar of jkr
jkr
Flag of Germany image

>>I want to prevent other apps killing my app

The only *reliable* way I know is to use your own (dummy) KMode driver and hold a call to that driver pending. But, be careful, if you cannot release that lock, even shutting down might be a problem :o)
Avatar of weicco
weicco

I've seen some rootkit that somehow managed to hide processes it started. I've heard that it is done by somehow changing the process id so that OS thinks that process is system process.
ASKER CERTIFIED SOLUTION
Avatar of BeyondWu
BeyondWu
Flag of United States of America image

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