Fastream Technologies wrote: > Now, does the end of this function (FOnClientAttached()) run in the worker > thread context?
No > If not, what's the point in waiting with > waitformultiplemessages? WaitForMultipleOBJECTS, not messages! In my opinion the listener thread needs to be blocked while the client has no window (until the client has the new window allocated in the worker thread). If you would post a message from the worker thread to the listener thread you would need to process messages in the listener thread in order to receive that message which would not block the listener thread. WaitForSingleObject would work also but is dangerous. - First object is an event handle signaled in the worker thread after the Client has called ThreadAttach. - Second object is the thread handle so if the thread thread terminates a new attempt is made to attach to another thread. --- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html > Isn't only the PostThreadMessage enough? > Francois, could you enlight me? I am puzzled! > > Best Regards, > > SZ -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be