How does task manager kill my program?

后端 未结 4 614
北恋
北恋 2021-01-18 00:22

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

4条回答
  •  野的像风
    2021-01-18 01:05

    Task manager internally uses the EndTask function. This functions sends a WM_CLOSE message to your application. If your application does not respond to that message and the user forces to terminate your Application, TerminateProcess is called on your process.

提交回复
热议问题