Article View: borland.public.cppbuilder.nativeapi
Article #16078Re: GetParentThread?
From: Tharun Pillay
Date: Tue, 03 Jun 2003 08:24
Date: Tue, 03 Jun 2003 08:24
34 lines
1841 bytes
1841 bytes
Thanks Ted. As I thought - see above response. "Ted Lyngmo" <MY_FIRST_NAME@lyncon.se> wrote in message news:3EDB7FFD.7080505@lyncon.se... > Tharun Pillay wrote: > > Anyone know how to get the calling thread eg: > > > > > > Thread 1 > > Thread1_1 > > Thread1_1_1 > > Thread1_1_2 > > > > > > How do I get the parent thread from inside Thread1_1_1? > > You can't, since threads do not have the kind of parent/child relationship you > describe while running. Even though one thread creates another, they all siblings. > > You can however can pass GetCurrentThreadId(), or a DuplicateHandle() of > GetCurrentThread(), to the threads you create using the 'lpParameter' of > CreateThread(). > > Kind regards, > Ted Lyngmo > > -- > Replace MY_FIRST_NAME in my email address with my first name to send a private > email to me. >
Technical Details
Message-ID:
<3edc5a6c@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3edb2f4a@newsgroups.borland.com> <3EDB7FFD.7080505@lyncon.se>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,51acd4b89590e X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-06-03 01:26:12 PST From: "Tharun Pillay" <tharun@webmail.co.za> Newsgroups: borland.public.cppbuilder.nativeapi References: <3edb2f4a@newsgroups.borland.com> <3EDB7FFD.7080505@lyncon.se> Subject: Re: GetParentThread? Date: Tue, 3 Jun 2003 10:24:25 +0200 Lines: 36 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 196.15.202.200 Message-ID: <3edc5a6c@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1054628460 196.15.202.200 (3 Jun 2003 01:21:00 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail