> In V6, how can I extract messages of the to be detached socket only? > Is it Peekmessage(Msg, OldHWnd, MsgLow, MsgLow + MsgCnt, PM_REMOVE)?
No. This would retrieve all messages for all component sharing the same TIcsWndHandler. It is necessary to iterate thru FMsgMap to find all occurence of self and get the corresponding message numbers (see TIcsWndHandler.AllocateMsgHandler) to use in PeekMessage. It is not guaranteed that all messages numbers for a given component are contiguous altough it will most of the time. The problem is to retrieve all message from the old queue and post them in the new queue in the same order. This can be solved by examining the time member in TMsg record. -- [EMAIL PROTECTED] http://www.overbyte.be ----- Original Message ----- From: "Arno Garrels" <[EMAIL PROTECTED]> To: "ICS support mailing" <firstname.lastname@example.org> Sent: Sunday, June 11, 2006 9:49 AM Subject: Re: [twsocket] Enhancements for Thread Attach/Detach methods > Francois PIETTE wrote: >>> AFAIK winsock API function WSAAsyncSelect() is a common, blocking >>> function. In this case it's called to disable winsock notifications. >>> Because the window is detached/destroyed in subsequent lines. >>> BTW: Same is done in V5. >>> So for a short while the detached socket is windowless, that's >>> why I suggested to wait w/o processing messages until it is >>> attached again (not nice but worked for me). >> >> To be safe, the order should be: >> 1) Stop notifications from winsock (WSAAsyncSelect) to the current >> (old) hidden window >> 2) Create the new hidden window >> 3) Extract all messages from old hidden window queue and push them to >> the new queue > > In V6, how can I extract messages of the to be detached socket only? > Is it Peekmessage(Msg, OldHWnd, MsgLow, MsgLow + MsgCnt, PM_REMOVE)? > > --- > Arno Garrels [TeamICS] > http://www.overbyte.be/eng/overbyte/teamics.html > > > >> 4) Restart notifications from winsock to the new hidden window >> >> Probably a good idea to post a FD_READ message in the new queue >> between 3 and 4 above. Because it may happend that data has been >> received during the time interval when notifications have been >> disabled. >> >> -- >> [EMAIL PROTECTED] >> http://www.overbyte.be > -- > 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 -- 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