Handling a process termination.
C / C++ / MFC
22
Posts
8
Posters
0
Views
1
Watching
-
Hi all! C++, WinAPI Is there any way to catch when process is being terminated (i.e. terminated by user from Task Manager, or ended in normal case) and do some code there. In other words I need to execute some code, in any cases when program is ending execution. Thanks
-
Hi all! C++, WinAPI Is there any way to catch when process is being terminated (i.e. terminated by user from Task Manager, or ended in normal case) and do some code there. In other words I need to execute some code, in any cases when program is ending execution. Thanks
You could try and hook the
TerminateProcess
API. But API hooking is not at all possible/recommended these days.«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++)