Click to See Complete Forum and Search --> : How to get ThreadHandle from ThreadId?
Ashley Antony
May 10th, 1999, 01:38 AM
If I got the threadId of a thread running in the system, how can I retrieve its handle. Thread is not created by me, it belongs to some other application
Ashley.Antony@in.bosch.com
B'lore,
India.
Lothar Haensler
May 10th, 1999, 02:10 AM
the OpenThread API returns a handle for a given ID.
Ashley Antony
May 11th, 1999, 01:21 AM
Hello Lothar,
I think it was a guess work. OpenProcess is there to return handle of the process id. But there is no such corresponding APIs like OpenThread(). If it is an undocumented one please tell me where can I find it
Ashley.Antony@in.bosch.com
B'lore,
India.
Lothar Haensler
May 11th, 1999, 01:58 AM
"guess work"? I take it as a joke!
OpenThread is documented in the Platform SDK. Requires Windows2000, though. Forgot to mention that.
Ashley Antony
May 11th, 1999, 02:48 AM
Sorry Lothar,
Whats the solution for NT4.0. I found an undocumented function NtOpenThread() in NTDLL.Dll. I tried with the parameters like OpenProcess(), but returning error 0xC0000005. Do you know what is this error?
Regards,
Ashley.Antony@in.bosch.com
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.