I read someone post recently about getting the Thread ID. Just in case not founded yet: I have fun with this one...And it seems to be the only way so far as i know...

PUSH offset Window_Name
PUSH offset CLASS_NAME
CALL FindWindowA
mov aHandle, eax
cmp eax,0
jz Not_Founded

push offset aProcess_ID
push eax
call _user_GetWindowThreadProcessId
Posted on 2002-10-18 04:30:18 by cmax
I had a looksee in the msdn (ca. July 2000) and came up with this function in the SDK. There seem to be a ton of funcs for dealing with threads.

DWORD GetCurrentThreadId(VOID)

This is a C func so you'll have to make sure you've got the correct libs linked & the correct pushes etc. but IIRC there's an Icz tute on threads so you could get the format for the funcs whathaveyou there.

Hope this help.
Posted on 2002-10-19 13:48:21 by rafe
1) This is not a C function. It is part of the Win32 API.
2) In this specific case, you don't need to push anything, as no parameters are passed to the function.
Posted on 2002-10-19 23:47:22 by death
Thank you death (I don't like the way that looks in print :))

The Win API vs. C-func is an important distinction.
Posted on 2002-10-22 15:45:43 by rafe