I have been running this code every 25ms to get this information:
Code: Select all
IsProcessSuspended(pid) {
For thread in ComObjGet("winmgmts:").ExecQuery("Select * from Win32_Thread WHERE ProcessHandle = " pid) {
If (thread.ThreadWaitReason != 5) {
Return True
} Else {
Return False
}
}
}
The problem is, that it is quite resource intensive. I am looking for a better way to find out of my process is currently running or suspended - or ideally something like WinWaitActive, but I doubt that exists. Eitherways, I really hope that you can help me, it's the only part of my program that still isn't performing well :/