I have this MFC program that when I kill it with task manager I get an exception on my program and then it crashes.
I want to get the event from the task manager, wh
Yes, these are the options.
For completeness, note that console mode applications get the CTRL_CLOSE_EVENT
send that you could react upon, when the "End Task" button is clicked.
Note that you cannot intercept or react upon TerminateProcess. Your process will die and there is nothing you can do before that happens. Actually, it would be pretty bad if you could. Because then there would be no way to terminate a process that went haywire.