The program is allocated HANDLE under the file. If the program is completed before the execution reaches the line with the release of the handle, the handle will not be released by itself? Is there a way to set a function when it stops working?
- When executing the process release procedure, the handles themselves are released by the system. If you do not have "special" cases (cross-process interaction), then everything will be ok. - nick_n_a
- If the problem with saving the file - add Flush - nick_n_a
- I do not know whether it is possible to intercept the TerminateProcess call, you can intercept the click on the cross, you can intercept Ctrl + C. You can add a handler to the end of main / WinMain. Specify whether the event is still necessary, and to what degree of complexity. - nick_n_a
|