This answer is very easy - just use GetWindowThreadProcessId
JWA declares it as followed:
The function returns an identifier (not a handle) and also may set lpdwProcessId to the identifier (again not a handle!) if it is not nil. Be aware that identifiers aren’t handles, so you must not close them by using CloseHandle. Identifiers are only numbers that makes an object distinguishable from other objects of the same type.
Tell me how you liked this blog entry by adding a comment.
One Response
How to get the threads of a process? by JEDI Windows API
19|Mar|2008 1[...] I described how to get the process of a window. Today I show you how to obtain the threads of a [...]
Leave a reply