Hi J,
You probably have figured out a way to do it. But I will let you know what
I did.
Your design pattern matches mine almost exactly. Atl Server receiving
messages on one thread, buffering them, publishing those messages to
subscribers via connection points on another thread.
Create a Window in your windowless server for each connection point. It
doesn't have to be visible of course. It just serves to receive messages
posted from your receiving thread. Save the hWnd in a common document.
When your receiving thread gets a message, push it into a stack, post a
message to the Window's hWnd, and go back to receiving.
The Window which lives in the other thread will wakeup, go to the common
document, pop off the message, and send it to the subscribers. You should
associate the interface pointer with the hWnd so you can make your
callbacks.
Since the Window was created in the same apartment that established the
connection point, it will be able to make the callback correctly.
BTW, don't try to callback using safearrays to your connection point
subscribers. Pass back simple data types or simple strings and parse them
on the client side if you need that capability. Or pass back an XML string
and let your .Net subscribing client handle the decoding.
Hope that helps,
Roger