🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: active thread list

#14757
From: Remy Lebeau (TeamB)
Date: Fri, 01 Aug 2003 16:54
27 lines
1879 bytes
"Boguslaw Fries" <B.Fries@luca-online.de> wrote in message
news:3f2a318c$1@newsgroups.borland.com...

> // this is my error as I think, but why OpenThread
> // as written in
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/bas
e/openthread.asp
> // does not exists????

It does exist.

>             hResult = OpenProcess( SYNCHRONIZE | PROCESS_TERMINATE, true,
> threadEntry.th32ThreadID ); // <--------------------------

You are trying to open a thread ID when OpenProcess() expects a process ID
instead.  They are not the same thing.

>             PostMessage( hResult, WM_CLOSE, 0, 0 );

You cannot post a message to a process handle.  You can only post messages
to an actual window handle or a thread handle (for threads, you need to use
PostThreadMessage() instead of PostMessage()).


Gambit
Technical Details
Message-ID: <3f2a99cc$2@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!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
References: <3f2a0a30$1@newsgroups.borland.com> <3f2a0afb$1@newsgroups.borland.com> <3f2a318c$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,30ec7a3d72e3790e
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-08-01 09:57:44 PST
From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3f2a0a30$1@newsgroups.borland.com> <3f2a0afb$1@newsgroups.borland.com> <3f2a318c$1@newsgroups.borland.com>
Subject: Re: active thread list
Date: Fri, 1 Aug 2003 09:54:12 -0700
Lines: 29
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 207.175.226.26
Message-ID: <3f2a99cc$2@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1059756492 207.175.226.26 (1 Aug 2003 09:48:12 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!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