🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #5896

Re: Check Thread State

#5896
From: Remy Lebeau (TeamB)
Date: Thu, 23 Jun 2005 18:52
18 lines
1538 bytes
"David" <diglesias@protega.net> wrote in message
news:42bafc6d$1@newsgroups.borland.com...

> can i know if a thread exists using its thread id?

Not directly, no.  Most thread-related API functions require a thread
handle, not a thread ID.  The API does not have any means of obtaining a
thread handle from a thread ID.

About the closest you can get is to call CreateToolhelp32Snapshot() from the
ToolHelp API and then walk the thread list via Thread32First() and
Thread32Next() until you find an entry that has the same ID thatr you are
looking for.  Do note, however, that the ToolHelp API is not available not
NT4, if you need to support that OS.


Gambit
Technical Details
Message-ID: <42bb04df$2@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <42bafc6d$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,d956c8a88fce8455
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <42bafc6d$1@newsgroups.borland.com>
Subject: Re: Check Thread State
Date: Thu, 23 Jun 2005 11:52:15 -0700
Lines: 20
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <42bb04df$2@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1119552735 68.69.17.41 (23 Jun 2005 11:52:15 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail