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. General Programming
  3. C / C++ / MFC
  4. Process Status

Process Status

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
4 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.
  • P Offline
    P Offline
    Phil Benson
    wrote on last edited by
    #1

    Does anybody know how to get extended information about a process under NT4/2000? I have the ProcessID, therefore I can get a handle etc. but I need to know if the process is still active(i.e. GetExitCodeProcess(hProcess, &dwExitCode)) does not help, if dwExitCode == STILL_ACTIVE the process could still be hung. Thanks

    Who the F*** is general failure and why is he reading my hard drive?

    S realJSOPR 2 Replies Last reply
    0
    • P Phil Benson

      Does anybody know how to get extended information about a process under NT4/2000? I have the ProcessID, therefore I can get a handle etc. but I need to know if the process is still active(i.e. GetExitCodeProcess(hProcess, &dwExitCode)) does not help, if dwExitCode == STILL_ACTIVE the process could still be hung. Thanks

      S Offline
      S Offline
      Scott H Settlemier
      wrote on last edited by
      #2

      enumerate the thread's windows (EnumThreadWindows) and try sending message with a timeout (SendMessageTimeout) to see if there is responsiveness.

      1 Reply Last reply
      0
      • P Phil Benson

        Does anybody know how to get extended information about a process under NT4/2000? I have the ProcessID, therefore I can get a handle etc. but I need to know if the process is still active(i.e. GetExitCodeProcess(hProcess, &dwExitCode)) does not help, if dwExitCode == STILL_ACTIVE the process could still be hung. Thanks

        realJSOPR Offline
        realJSOPR Offline
        realJSOP
        wrote on last edited by
        #3

        Use this

        DWORD dwResult;
        BOOL bResponding = SendMessageTimeout(hwndInQuestion,
        WM_NULL,
        0,
        0,
        SMTO_ABORTIFHUNG,
        5000,
        &dwResult);

        bResponding is TRUE if the process is responding and processing messages. This is precisely the way Task Manager works. ------- signature starts "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 Please review the Legal Disclaimer in my bio. ------- signature ends

        P 1 Reply Last reply
        0
        • realJSOPR realJSOP

          Use this

          DWORD dwResult;
          BOOL bResponding = SendMessageTimeout(hwndInQuestion,
          WM_NULL,
          0,
          0,
          SMTO_ABORTIFHUNG,
          5000,
          &dwResult);

          bResponding is TRUE if the process is responding and processing messages. This is precisely the way Task Manager works. ------- signature starts "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 Please review the Legal Disclaimer in my bio. ------- signature ends

          P Offline
          P Offline
          Phil Benson
          wrote on last edited by
          #4

          Wow, thanks, that´s what I call a speedy response, thanks again !

          Who the F*** is general failure and why is he reading my hard drive?

          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