How can I get the current state of a thread (like blocking, suspending, starting, etc.) in win32?

I haven't been able to find a documented API that gives this information.

A friend suggested using NtQuerySystemInformation. After searching, the information is there (see SYSTEM_THREAD ), but it is undocumented and not very elegant - I get information for all threads in the system.

Do you know about this more elegant, preferably documented API?

+1


source to share


1 answer


There is no other way other than using NtQuerySystemInformation

. However, this may be less complicated, it is true, but Microsoft has no implementation.

I've posted a working class here that is very graceful to use:



How to get the state of a thread (eg suspended), memory + cpu usage, start time, priority, etc.

0


source







All Articles