🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: error invlid handle when trying to postthreadmessage

#12232
From: Mark Di Nicola
Date: Wed, 17 Dec 2003 00:54
28 lines
2052 bytes
Remy Lebeau (TeamB) wrote:
> 
> Where are you getting your ThreadID from to begin with?  Are you sure that
> the thread is still running at the time that you are posting the message?
> Are you sure that PeekMessage() has already been called at least once before
> you post the message to the thread?

from the thread object ie tThread->ThreadID. postmessage has been 
called, does it matter if there were no messages?

> 
> Have you looked at the latest documentation for PostThreadMessage()? It has
> the following notes:
> 
>     Parameters
>     idThread
>         ...
>         Windows 2000/XP: This thread must either belong to the same desktop
> as the calling thread or to a process with the same locally unique
> identifier (LUID). Otherwise, the function fails and returns
> ERROR_INVALID_THREAD_ID.
> 

yep. he's not using multiple desktops (i assume thats what its talking 
about). how do i get the LUID? i understand its just a unique value but 
how is it used exactly?

mark
Technical Details
Message-ID: <3fdfa89d$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3fdf9bb2$1@newsgroups.borland.com> <3fdfa031$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,6e41c9ea28efb76e
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-12-16 17:09:40 PST
Date: Wed, 17 Dec 2003 11:54:51 +1100
From: Mark Di Nicola <don't@emailback.com>
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5) Gecko/20031007
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: error invlid handle when trying to postthreadmessage
References: <3fdf9bb2$1@newsgroups.borland.com> <3fdfa031$1@newsgroups.borland.com>
In-Reply-To: <3fdfa031$1@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 220.240.226.12
Message-ID: <3fdfa89d$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1071622301 220.240.226.12 (16 Dec 2003 16:51:41 -0700)
Lines: 29
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail