windows - C# catch kill command -


How can I catch windows taskkill command to avoid this?

You can not not prevent a program from hitting your process The only way to keep alive is to complete the process to ensure that it is the second watchdog application that is constantly running.

So, you have two apps; APP (Main) and APB (Watchdog)

apa check if APP is running. If not, then APP starts APP .

APP checks if apa is running. If not, then AppB starts APP .

But this is usually a design for the malicious process, so I hope you are not unpleasant about anything.

You can see the following events in the message queue when the end process is clicked:

WM_CLOSE // UI app

CTRL_CLOSE_EVENT // console app

But if your app does not shut down on time, the kill command will be sent, which can not be captured.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -