Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. Article Writing
  4. Trapping the Kill of a process in Task Manager

Trapping the Kill of a process in Task Manager

Scheduled Pinned Locked Moved Article Writing
helpcsharpjson
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    manivannan p
    wrote on last edited by
    #1

    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,

    V A 2 Replies Last reply
    0
    • M manivannan p

      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,

      V Offline
      V Offline
      Vasudevan Deepak Kumar
      wrote on last edited by
      #2

      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/

      1 Reply Last reply
      0
      • M manivannan p

        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,

        A Offline
        A Offline
        Anton Mikhalyov
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups