Attach to System processess?
Posted on 2000-01-17
Platform: Win NT 4.0, MS VC++ 5.0
I want to be able to terminate system processes programmatically similarly to what the VC++ (Build->Start Debug->Attach Process...-> Show System Process) can do.
At times third-party services I use behave erratically and a shutdown is in order. However, these services will not terminate successfully. The TerminateProcess() call I use within my program (similar to the Task Manager->End Task)returns a 'Access Denied' error and does not terminate the process.
I can, however, pull up a session of MS VC++, attach it to the process via the debugger, and once I stop the debugging the process is terminated.
How can I acheive this?