Why hook ProcessTerminate? - You just need to hook OpenProcess.
But why do you do so? - Just create a process with Admin-Account and don't let the user get Admin-Rights and your process acts like it should, cause a Non-Admin can't terminate Processes from an Admin-Account. Or create a service.
Bernhard
Yes, hooking XxOpenProcess maybe better than hooking XxProcessTerminate. I'll implement that later. No, user can use my app in Admin-Account. My problem is user can kill my app from end task.