Article View: borland.public.cppbuilder.nativeapi
Article #5972Suspend / resume a thread given only the thread id
From: Helmut Giese
Date: Wed, 22 Jun 2005 20:32
Date: Wed, 22 Jun 2005 20:32
22 lines
1479 bytes
1479 bytes
Hello out there,
I have the following requirement: In a third party package threads are
created like this:
tHandle = (HANDLE) _beginthreadex(NULL, (unsigned) stackSize,
proc, clientData, 0, (unsigned *)idPtr);
/*
* The only purpose of this is to decrement the reference count so
* the OS resources will be reaquired when the thread closes.
*/
CloseHandle(tHandle);
Within this package only *idPtr is used. to identify a thread.
Now I need to suspend / resume these threads, which requires the
handle - which is gone due to the call to CloseHandl.
Is there any way to suspend / resume a thread given just its 'thread
id' ?
Any help will be greatly appreciated.
Best regards
Helmut Giese
Technical Details
Message-ID:
<42b9c7b5.8689343@forums.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,7fcdd3480d100ea8,start X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: hgiese@ratiosoft.com (Helmut Giese) Newsgroups: borland.public.cppbuilder.nativeapi Subject: Suspend / resume a thread given only the thread id Date: Wed, 22 Jun 2005 20:32:49 GMT Message-ID: <42b9c7b5.8689343@forums.borland.com> X-Newsreader: Forte Free Agent 1.21/32.243 NNTP-Posting-Host: 141.51.159.109 X-Trace: newsgroups.borland.com 1119472235 141.51.159.109 (22 Jun 2005 13:30:35 -0700) Lines: 22 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail