views:

251

answers:

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?

A: 

NtQuerySystemInformation is totally documented and the best method. The other answer is completely off topic

NtQuerySystemInformation is documented but the structures it returns are sometimes not.
dalle