Re: C++ COM STA model
"George" <George@discussions.microsoft.com> wrote in message
news:568AFEA1-D919-4EE8-95C1-92FC7BDC5684@microsoft.com
I think the function call through public method of interface
(retrieved from QueryInterface) is translated into message pump. Is
that correct?
Like I said, if you make an out-of-apartment COM call from STA thread,
COM does run a modal message pump while waiting for the call to return.
See also IMessageFilter
How does message pump work?
Read about GetMessage, DispatchMessage in your favorite Windows
programming textbook.
Like enqueue a message into a double ended
queue, one end is the function call, the other end is the component
itself?
It's a queue of window messages, not of COM calls. In some cases, COM
sends a message to that special hidden window to notify it that an
incoming COM call has arrived and is waiting to be processed.
See also
http://support.microsoft.com/kb/q150777/
http://msdn2.microsoft.com/en-us/library/ms809971.aspx
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925