How do I check to see if a Win32 thread is running or in suspended state?
I can\'t find any Win32 API which gives the state of a thread. So how do I get the thread s
you could get thread suspend count with code like this:
DWORD GetThreadSuspendCount(HANDLE hThread) { DWORD dwSuspendCount = SuspendThread(hThread); ResumeThread(hThread); return dwSuspendCount; }
but, as already said - it is not accurate. Moreover, suspending a thread is evil.