Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GetThreadId on pre-vista systems?

Apperantly, GetThreadId is a Vista API. How can I get a thread's id on pre vista systems?

like image 214
sold Avatar asked Oct 03 '09 22:10

sold


1 Answers

There are a few options:

  • When you call CreateThread, you get the handle back.
  • You can call GetCurrentThreadId to get the current thread's ID.
  • You can use Thread32First/Thread32Next to enumerate threads.
like image 195
Reed Copsey Avatar answered Nov 13 '22 06:11

Reed Copsey