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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Ending processes notification

Ending processes notification

Scheduled Pinned Locked Moved C / C++ / MFC
questionjavascript
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.
  • C Offline
    C Offline
    confalonieri
    wrote on last edited by
    #1

    Hello. I'm working on an application that displays processes state. I manage to get their handles thanks to "OpenProcess" function. Now I'd like my application to react when one of these processes terminates. How can I do ? I understand that I probably have to implement callback functions, but how ? Do I have to use "RegisterWaitForSingleObject" function ? Thanks.

    L L 2 Replies Last reply
    0
    • C confalonieri

      Hello. I'm working on an application that displays processes state. I manage to get their handles thanks to "OpenProcess" function. Now I'd like my application to react when one of these processes terminates. How can I do ? I understand that I probably have to implement callback functions, but how ? Do I have to use "RegisterWaitForSingleObject" function ? Thanks.

      L Offline
      L Offline
      l a u r e n
      wrote on last edited by
      #2

      ummmm unfortunately its not so easy to get notified of things happening in other parts of the system ... thats why the process viewer in winnt polls every few seconds and gets a snapshot of whats happening theres a styling article in an old copy of msj (jan 1999 - nerditorium) thats suggests using a fake kernel mode driver that can send notification to the user mode app across the dark divide from the kernel where it all happens (yeah yeah) check it out ... i think it'll answer you're question :cool: mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them

      1 Reply Last reply
      0
      • C confalonieri

        Hello. I'm working on an application that displays processes state. I manage to get their handles thanks to "OpenProcess" function. Now I'd like my application to react when one of these processes terminates. How can I do ? I understand that I probably have to implement callback functions, but how ? Do I have to use "RegisterWaitForSingleObject" function ? Thanks.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        If you can't get the notification - and I can't think of it at the moment, you can poll for the termination of the application using GetExitCodeProcess(). This will either tell you the process is still alive, or give you its exit code. Not ideal, but a start. Stepehn Kellett

        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