Re: Sorry If Wrong Group - PostThreadMessage and WM_COPYDATA.

Tech-Archive recommends: Fix windows errors by optimizing your registry



"Mike Collins" <its@TheBottomOfThePost> wrote:

I'm trying to achieve some Inter-Thread Communication between threads in a
service intended to work on XP and Vista. I need to send more data than
just a numeric indicator and I though i could achieve this with
PostThreadMessage() and a WM_COPYDATA message.

Is this posisble or can WM_COPYDATA only be used with SendMessage()? If so,
does anyone have any other ideas how i can easily achieve this?

If you are communicating between threads within a single process, why do
you need any of this? Threads share the same address space. You can just
implement your own queue for each thread, and pass pointers to objects, or
whatever you need.
--
Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.
.