What message I receive when I kill my program with task manager

我们两清 提交于 2019-12-01 06:19:38

Your process will not get any messages in case if it is being killed. Start on TerminateProcess - see my highlight:

The TerminateProcess function is used to unconditionally cause a process to exit. The state of global data maintained by dynamic-link libraries (DLLs) may be compromised if TerminateProcess is used rather than ExitProcess.

This function stops execution of all threads within the process and requests cancellation of all pending I/O...

EDIT: Hans Passant comment on way tasks terminated - You only get WM_CLOSE when using the Applications tab in task manager. Killing it from the Processes tab is a rude termination (TerminateProcess).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!