1

I couldn't find a documented API that yields this information.

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

Do you know of a more elegant, preferably documented API to do this?

  • 1
    I posted a working class here: http://stackoverflow.com/questions/22949725/how-to-get-thread-state-e-g-suspended-memory-cpu-usage-start-time-priori – Elmue Apr 08 '14 at 23:19

1 Answers1

0

There is no other way than using NtQuerySystemInformation. However it could be less complicated, that's true, but Microsoft lacks an implementation.

I posted a working class here that is very elegant to use:

How to get thread state (e.g. suspended), memory + CPU usage, start time, priority, etc

Community
  • 1
  • 1
Elmue
  • 7,602
  • 3
  • 47
  • 57