Assume thread T is spawned by process P.
Process Q knows T's ID number, but nothing else.
Is it possible for Q to obtain a valid thread handle to T, using T's
ID only ?
The MSDN documentation specifies an OpenThread function, valid in
NT5+. I would like to do this in Win95/98 NT4.0+
Thanks in advance, Ron.
"There is no way to get the thread handle from the thread ID. While there is
an OpenProcess() API that takes a PID and returns the handle to the process,
there is no corresponding OpenThread() that takes a thread ID and returns a
thread handle." (Article Q127992)
You can call NtOpenThread directly (in ntdll.dll), but the function isn't
documented -- the parameters, and the implementation of on OpenThread
function can be found at
http://x12.dejanews.com/getdoc.xp?AN=432603633&CONTEXT=917313802.2045247631&
hitnum=3
(Go to DejaNews and search on NtOpenThread.)
Jeff
Ron Darziv wrote in message <36aca4f4...@news.ibm.net.il>...
http://x5.dejanews.com/getdoc.xp?AN=209007149&CONTEXT=917866320.180420869&hitnum=30
Ciao
juergen