> Hi,
>
[quoted text clipped - 9 lines]
> Questions:
> 1) What kind of Apartment are the threads in the threadpool?
Generally speaking, they're not in any apartment. I would assume, however,
that they'll automatically enter the MTA if necessary. That doesn't help
with your STA component though.
> 2) In legacy COM programming, I need to manually marshal the COM interface
> pointer to the other Apartment.
>
> If I simply pass the interface in .Net as a parameter when I call the
> delegate.BeginInvoke(), will .Net marshals the interface for me?
I don't think so. Even if it did, it wouldn't do what you want anyway,
since the marshalled interface pointer would simply marshall the call back
into the thread that created the component in the first place - that's the
only thread a STA component can run on.
If you have a STA component, you really don't have any practical alternative
to simply calling all of it's member functions on your UI thread.
-cd