[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ProgSoc] Windows thread communication?



Hi y'all

I'm trying to get two threads to communicate in Windows <SHUDDER>. I'm
using PostThreadMessage in one thread and PeekMessage in the other
thread.  PostThreadMessage fails and GetLastError() returns 1159:
ERROR_MESSAGE_SYNC_ONLY which MSDN tells me means the message can only
be used with synchronous operations. What does this mean? I thought
that PostThreadMessage allowed asynchronous communication between
threads. Any ideas why this happens? Or how else can I send a message
from one thread to the other without the first thread blocking?

BTW, I'm using Borland C++ Builder 5 Enterprise. Problem is the same on
Windows 98 and 2000.

TIA
Geoff
-- 
------------------------------------------------------------------------
   Geoff Saxby   geoffs@nospam.mindless.com
                 http://www.progsoc.uts.edu.au/~geoffs

   "I don't know where you magic pixies came from, but I sure like your
   pixie drink!"
   	-- Barney Gumble
------------------------------------------------------------------------
-
You are subscribed to the progsoc mailing list. To unsubscribe, send a
message containing "unsubscribe" to progsoc-request@nospam.progsoc.uts.edu.au.
If you are having trouble, ask owner-progsoc@nospam.progsoc.uts.edu.au for help.