heya.. I have a problem getting the context of a process which is *running* (so it was not started with CreateProcess) and it's debbugged by my application... the problem is that I don't know how to get it's thread handle :(
id appreciate any help or code snippet
thank you
Posted on 2004-11-21 08:28:43 by DZA
Posted on 2004-11-21 09:13:07 by ti_mo_n
no you got it wrong, with that you will only retrieve de identifier of the process not the pseudohandle of the thread (msn: "This handle has the maximum possible access to the thread object. For systems that support security descriptors, this is the maximum access allowed by the security descriptor for the calling process. For systems that do not support security descriptors, this is THREAD_ALL_ACCESS." )

... you can find that by calling GetCurrentThread in the process but as far as I know there's no api function to retrieve that from the context of another process.. I could just inject some code which calls GetThreadHandle in that process and then just duplicate it to my process, but I was just wondering if there's a less complicated way around this problem.
Posted on 2004-11-21 09:38:18 by DZA