Re: Any Api on win NT to get thread handle from thread id?.

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



> I have a requirement that I want to know if a thread is alive or not,
> but I have only it's thread id and I am on win NT.

See CreateToolhelp32Snapshot, followed by Thread32First and Thread32Next
The problem is that the ToolHelp Library is there for all systems but NT :-(

Fot NT you have to use PSAPI, with EnumProcesses and EnumProcessModules.
Not sure about threads though. Where do you get the thread ID from?

--
Mihai Nita [Microsoft MVP, Windows - SDK]
------------------------------------------
Replace _year_ with _ to get the real email
.



Relevant Pages