Log in

View Full Version : a thread handle problem


tsehp
January 10th, 2001, 08:15
My problem : I have to inject some into a remote thread on win9x, to do that I need a thread handle, to freeze/restart the target thread where I inject my code, I can only retrieve thread id's with the createtoolhelp32 api, but don't know actually a method to retrieve the thread handle from thread id. The getcurrentThread api is useless, because working
already into the target's context, but I have to get this handle from my own process.
Does anybody how to solve this problem ? whatever the complexity, I'll take any solution.
TIA

+Tsehp

Iceman
January 10th, 2001, 10:19
On NT you have NtOpenThread. On 95 , you can simulate this API trough varius means , a ready implemented one is to be found in Elicz ApiHokks source. Also check Icedump source code and thread related commands it conatins a lot of usefull info too.

disavowed
January 10th, 2001, 15:03
http://www.insidetheweb.com/messageboard/mbs.cgi?acct=mb869669&MyNum=979155934

tsehp
January 10th, 2001, 16:05
Quote:
disavowed (01-10-2001 04:03):
http://www.insidetheweb.com/messageboard/mbs.cgi?acct=mb869669&MyNum=979155934

thanks disa :-)
but not on win98, this would have been too simple :
Windows NT/2000: Requires Windows 2000 or later.
Windows 95/98: Requires Windows Me.
Header: Declared in Winbase.h; include Windows.h.
Library: Use Kernel32.lib.
extracted from m$ docs.

Anyway if I can't emulate this fonction, I'll be forced to restrain to win me for revirgin

tsehp
January 10th, 2001, 16:08
Quote:
Iceman (01-09-2001 23:19):
On NT you have NtOpenThread. On 95 , you can simulate this API trough varius means , a ready implemented one is to be found in Elicz ApiHokks source. Also check Icedump source code and thread related commands it conatins a lot of usefull info too.


Thanks a lot iceman, I've checked the apihooks source and found nothing concerning emulating openthread on win95/98 but I'll check deeper.
+Tsehp