Everhart,Glenn From: Dimitris Staikos [dstaikos@unibrain.com] Sent: Wednesday, May 06, 1998 1:47 AM To: ntdev@atria.com Subject: RE: [ntdev] Determine thread's parent thread Hi, >Is there any way to determine the ID or other identifying information >about the thread that created the current thread >in Win32 app? It can be done. Check out MSJ January 97, Under The Hood by Matt Pietrek. In short: You use function NtQueryInformationProcess found in the DDK. You copy some of the DDK definitions in a separate header file, include it in your program source and call the function with the ProcessBasicInformation flag. This will return you a PROCESS_BASIC_INFORMATION structure which has what you want. The source code can be found at ftp://ftp.microsoft.com/developr/MSJ/Msjjan97.exe --------------------------------------------------------------------------- Dimitris Staikos dstaikos@unibrain.com (Business mail only please), dstaikos@softlab.ece.ntua.gr (Personal mail), ICQ UIN 169876 Software Systems & Applications Chief Engineer, UniBrain, www.unibrain.com --------------------------------------------------------------------------- Any sufficiently advanced bug is indistinguishable from a feature. Some make it happen, some watch it happen, and some say, "what happened?" How can we remember our ignorance, which our progress requires, when we are using our knowledge all the time? How a man plays a game shows something of his character, how he loses shows all of it. --------------------------------------------------------------------------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [ To unsubscribe, send email to ntdev-request@atria.com with body UNSUBSCRIBE (the subject is ignored). ]