How to get a thread handle from a threadID ?
Or simply, how to get a thread handle (of a thread you haven't created of course ;)) ?
Posted on 2002-09-24 06:57:57 by Axial
Posted on 2002-09-24 08:07:38 by Thomas
OpenThread Damn ! This wasn't on my MSDN CD too! Maybe you know a way of downloading the whole MSDN from microsoft ?
Posted on 2002-09-24 09:18:04 by Axial

OpenThread Damn ! This wasn't on my MSDN CD too! Maybe you know a way of downloading the whole MSDN from microsoft ?


Nope, but you can download the Platform SDK....that gives more up to date includes and libs...as well as the documentation.

<edit> Doh...forgot the link :stupid: </edit>

Platform SDK
Posted on 2002-09-24 10:07:49 by Fordy
Thank you Fordy but there is no download button on this web page :confused:
Posted on 2002-09-24 10:26:41 by Axial
Not so easy, Axial, not so easy ;).
OpenThread is new one.
There is no such func on w95, w98, NT4.0 (and earlier).
It exist only in w2k, xp and me (not quite sure about me).

To have thread handle under os not supported OpenThread, you have to do some undoc tricks.
I know how it can be done under w9x. See attachment.
The code is a bit messy (was long ago), but it works. And only for w9x.
I never needed it for NT <=4.0, so can't say something useful.
Posted on 2002-09-24 10:43:31 by Four-F

Thank you Fordy but there is no download button on this web page :confused:


You have to use Internet explorer and let it sit there for a little while....some sort of activeX trickery that launches an installer.....this then checks for currently installed SDKs and then gives the options to install....go for the CoreSDK to begin.....

Unfortunatley, this doesnt work too well if you use another browser..(I use opera 99% of the time and internet explorer for Windows Update & Platform SDK downloads)
Posted on 2002-09-24 10:47:53 by Fordy
Hi Four F,

This looks almost like what I 'm trying to do. :)
Actually, Im writing something that should suspend the primary thread of the target app, inject code to get the current handle of the thread, duplicate it, set eip pointing to the injected code and then resume thread from the server ect...
I plan to write a W9xRemoteThread function you know :)
Thanks again :alright:

Fordy

I have both, opera and IE, but I trashed all that java-activx stuff, well don't tell me why i dunno... I cannot reactiv it... :) (<- I have to do all these smileys by hand)

Maybe a naughty virus slip into my comp :grin:
Posted on 2002-09-24 11:30:55 by Axial
Under NT4.0 you can call undocumented ntdll.NtOpenThread.
Posted on 2002-09-25 05:24:21 by Four-F