Fastream Technologies wrote:
> But it always stops at that dispatchmessage! Persistent and insistent.

Now that I have some minutes, I checked the source code again,
however I cannot find any bug, may be sorting out things helps a bit?

When a window is being destroyed all pending messages in thread's
message queue addressed to the destroyed window are being removed
as well. I just wrote a little test project that confirms the API doku.
So it seems impossible that GetMessage/PeekMessage will ever retrieve
messages to an already destroyed window.

Since winsock does not try to send any further notification messages
to the destroyed window (as Francois already mentioned) this can be
sorted out as well.

Remains the case when the window is not being destroyed, but registered 
message numbers have been unregistered. Means there may be still messages
pending in thread's message queue addressed to an existing window, however
they won't be handled by the component but passed to DefWindowProc which
will throw them away.

Do you register new custom messages, thru AllocateMsgHandlers? If so   
are they unregistered properly by overriding FreeMsgHandlers as well?

Also critical: When the component has no window handle and for some
reason property Handle is called an auto-attach is performed by the 
component which _must_ be avoided. 

Remains the question whether important messages may be removed upon the
call to ThreadDetach()? I don't think so, given that it's called after 
SessionClosed, though the message pump may be called from InternalClose,
however that should not hurt at all. 

--
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html

> 
> On 8/22/07, Arno Garrels <[EMAIL PROTECTED]> wrote:
>> 
>> Fastream Technologies wrote:
>>> Is TranslateMessage really needed in a socket worker thread?
>> 
>> I guess it's not needed, however I use it in all of my pumps.
>> 
>>> All I know is I see
>>> "EAccessViolation" at DispatchMessage() of worker thread.
>> 
>> The debugger isn't very reliable in multi-threaded applications
>> it happens that it stops at one line whilst the error is at a
>> different location.
>> 
>> --
>> Arno Garrels [TeamICS]
>> http://www.overbyte.be/eng/overbyte/teamics.html
>> 
>> --
>> 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
>> 
> 
> 
> 
> --
> CSA, Fastream Technologies
> Software IQ: Innovation & Quality
> www.fastream.com | Email: [EMAIL PROTECTED] | Tel: +90-312-223-2830
> Join IQWF Server Yahoo group at
> http://groups.yahoo.com/group/IQWFServer Join IQ Reverse Proxy Yahoo
> group at http://groups.yahoo.com/group/IQReverseProxy
-- 
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

Reply via email to