Process kill event

  • Thread starter Thread starter gil sh via .NET 247
  • Start date Start date
Gil,

To my knowledge, there is no such event. The primary thread on which the
process is running is terminated by the operating system -- therefore, there
is no process left for any of the events you listed to fire on.

Now, the "End Process" button on the task manager is different from the "End
Task" button or what happens when you click "Shut Down". End Task and Shut
Down send a more friendly shut down message to the application, and you will
find that the standard events work just fine.

What is your purpose in interrupting the process kill? Depending on the
environment, you may be able to detect when the process has been terminated
by watching it with another process.

-Michael
 
I am looking for an event thet raises when the proccess is killed (for ex: Shotdown from the TaskManeger)

A windows application is terminated by receiving any of the WM_CLOSE,
WM_DESTROY or WM_QUIT messages from the operating system. If none of
these messages are received then your application has nothing to trap
and know that it gets killed. If think TaskManager simply uses
TerminateProcess without any other messages, meaning that you cannot
trap this event.

Are you needing an application that is always alive? Maybe something
along the lines of a system service is more what you need??

Simon Hayden
http://www.AutoUpdatePlus.com
Get software updates to your clients the Quick and Easy way!
Latest Version ==========>>> Client Computer
 
Back
Top