SetConsoleCtrlHandler routine issue

后端 未结 5 884
逝去的感伤
逝去的感伤 2021-02-18 21:43

I\'m writting a console application in C++.

I use SetConsoleCtrlHandler to trap close and CTRL+C button. This allows for all my threads to stop and exit properly.

<
5条回答
  •  鱼传尺愫
    2021-02-18 21:51

    I suspect that this is by-design on Windows 7 - if the user wants to quit your application, you're not allowed to tell him "No".

提交回复
热议问题