Process Status
-
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
-
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
enumerate the thread's windows (EnumThreadWindows) and try sending message with a timeout (SendMessageTimeout) to see if there is responsiveness.
-
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
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
-
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
Wow, thanks, that´s what I call a speedy response, thanks again !