HowTo :: Return "Access Denied" when a person\program requests to "End Process"?

Corayzon

New member
Joined
Dec 29, 2005
Messages
1
Location
Melbourne, Australia
Programming Experience
5-10
HowTo :: Return "Access Denied" when a person\program requests to "End Process"?

Hello peepz,

Im developing an application that logs off windows after a certain amount of time. Mainly to stop the kiddies playing games all night when they have school work to be completed.

But i have one floor in my current solution!

A user\program is able to end the process of the program that schedules the shutdown, therefor, stopping the log off.

I solved this in internet cafe's by having a udp packet sent from the server that the client returns as an encoded version of. Meaning if the client doesnt send the response udp packet by the timeout period then the admin is alerted that the user on 'computer name' and 'ip address' has killed the schedule process.

This is all well, but when my kiddies do this, a simple udp bouncer doesnt alert anyone of anything when im in bed asleep or not home.

Ive come across the idea, that i could also have a "Access Denied" message returned to a user\process that attempts to "End Task" on the schedule process.

I been looking around for examples on this for around a week now, and have had no luck whatsoever.

Can anyone help me?

Just to ensure my question is understood correctly i want to:

Return a message saying "Access Denied" when a user tries to "End Task" on a process.

Thankz in advance: Matt
 
I read this somewhere, maybe it's useful for you:
...there is indeed a way to avoid your process being killed by TerminateProcess (in fact there are still other ways to terminate it, but TerminateProcess won't work anymore). Just outlining the procedure though: Your main process (A) launches another dummy process (B) which then calls DebugActiveProcess(A's pid), signals a named Mutex to signal A the init phase is complete (of course any other way of IPC is possible). After the Mutex has been signaled (A must have waited for this mutex), A then calls DebugActivePRocess(B's pid). From now on this process pair isn't TerminateProcess-able anymore.
(found it here: http://www.experts-exchange.com/Programming/Q_20898355.html )
 
Back
Top