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
LVL 1
fengtao2000Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
BeyondWuConnect With a Mentor Commented:
If you can accept a none clean choice, you can go to http://www.internals.com/.
The StickyApp32 is what you wanted.

God Day!
0
 
jkrCommented:
>>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)
0
 
weiccoCommented:
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.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.