Search code examples
c++windowswindows-vista

How to get event when application is closed from task manager?


I have developed a Win32 application using C/C++, which runs on Vista and XP.

I wanted to know, can I get any event in my application when my application is killed from task manager, by selecting the "end process" button?

I want to free some memory on exit of my application.


Solution

  • Nope, your application is terminated without any notice. You are at mercy of Task Manager.