Article View: borland.public.cppbuilder.nativeapi
Article #14993GetCurrentProcessId(),GetCurrentThreadId() ?
From: CC
Date: Fri, 25 Jul 2003 16:40
Date: Fri, 25 Jul 2003 16:40
21 lines
1704 bytes
1704 bytes
Greetings I have a server that uses TThreads to service clients. Each thread logs debug info, and prints result from GetCurrentProcessId() and GetCurrentThreadId() as part of debug info. My goal is to have each line tagged wih thread id, that way if I want to view messages from just on thread, I can filter by one thread id. The function which does the logging is not part of the thread, but just a regular function call, not a member of any class. The problem is I'm getting the same process and thread ID for all messages for both threads (process id expected the same, i expected to get thread id different). Any ideas on how I can get the unique TTHread's unique id? Thanks for the assistance, CurtC
Technical Details
Message-ID:
<3f215d5e@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-04!sn-xit-01!sn-xit-05!sn-xit-09!supernews.com!news.maxwell.syr.edu!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,7d819d0bb118e239,start X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-07-25 10:00:05 PST From: "CC" <Xcurtc@tmscorp.com> Newsgroups: borland.public.cppbuilder.nativeapi Subject: GetCurrentProcessId(),GetCurrentThreadId() ? Date: Fri, 25 Jul 2003 11:40:39 -0500 Lines: 23 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: 208.254.250.201 Message-ID: <3f215d5e@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1059151198 208.254.250.201 (25 Jul 2003 09:39:58 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-04!sn-xit-01!sn-xit-05!sn-xit-09!supernews.com!news.maxwell.syr.edu!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail