Trapping the Kill of a process in Task Manager
-
Hi , I have a problem for which, I found no solution till now. Would be very happy if you could help me in this. This is in Windows OS. I have a C**# .NET** windows application running. I go to TaskManager and kill the process. Now, I want my application to be aware of this killing.I tried all the WIN API's and events too but nothing is fired back to the application. All these Closing and Handle destroying events are called only when I close the application. Please help me in finding a solution for the same. Thanks and Regards,
-
Hi , I have a problem for which, I found no solution till now. Would be very happy if you could help me in this. This is in Windows OS. I have a C**# .NET** windows application running. I go to TaskManager and kill the process. Now, I want my application to be aware of this killing.I tried all the WIN API's and events too but nothing is fired back to the application. All these Closing and Handle destroying events are called only when I close the application. Please help me in finding a solution for the same. Thanks and Regards,
Manivannan: Windows would'nt definitely support this. Had there been an exposure of API call from Windows trapping Kill from TaskManager, Spyware, Viruses and other malicious programs would become very overjoyed. Deepak Kumar Vasudevan Personal Web: http://vdeepakkumar.netfirms.com/ I Blog At: http://deepak.blogdrive.com/
-
Hi , I have a problem for which, I found no solution till now. Would be very happy if you could help me in this. This is in Windows OS. I have a C**# .NET** windows application running. I go to TaskManager and kill the process. Now, I want my application to be aware of this killing.I tried all the WIN API's and events too but nothing is fired back to the application. All these Closing and Handle destroying events are called only when I close the application. Please help me in finding a solution for the same. Thanks and Regards,
Only one way I know - you must write a driver that hooks a NtTerminateProcess, NtShutdownProcess functions exported by ntdll.dll. From user-mode you're not allowed to hook this functions.