GetThreadId on pre-vista systems?
Apperantly, GetThreadId is a Vista API. How can I get a thread's id on pre vista systems? Reed Copsey 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. If you can somehow make the thread in question call GetCurrentThreadId and store it somewhere, you could read the result. If the thread in question enters an alertable wait state frequently, you could send it an APC with QueueUserAPC ; the APC handler can then call GetCurrentThreadId and