Click here to Skip to main content
15,900,906 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,

How can I use access rights to prevent other processes from killing my process?
I want it to be compatible with all operating systems.
We used SetKernelObjectSecurity API in order to deny TERMINATE_PROCESS access but my process is still killable.

Thank you.
Posted
Comments
Albert Holguin 15-Apr-12 21:53pm    
Why would you want a process that you can't kill? Sounds fishy to me...
lilyNaz 16-Apr-12 0:42am    
I am writing some sort of anti-virus and I need to protect my process. Like other anti-viruses, I need mine to be unkillable as much as possible.
Albert Holguin 16-Apr-12 19:11pm    
Follow solution 1... it's what most people do.
Aescleal 16-Apr-12 5:50am    
Either fishy or he doesn't realise that it'll take more than a user mode process to protect a system. Let's assume he's just naive for now.

1 solution

There is no way -or at least no "legal" way- to make a process unkillable. What you could try to do is make a second process that will restart your process if it quits (gets killed) and make your process restart that process if that quits (gets killed).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900