Re: marshall interface needed?
"George" <George@discussions.microsoft.com> wrote in message
news:5FAB3489-F8BB-48F8-8614-BB1D8BD11C99@microsoft.com
You, as a client of A, don't have access to B pointer, and in fact
don't need to know nor care that A uses B at all. That is A's
implementation detail. The solution is not to break COM rules in the
first place, and properly marshal A's pointer.
Sorry, I do not express my solution clearly. I mean the solution is
like this, A holds proxy pointer to B, A is MTA and B is out-of-proc
server. My solution to let another STA to use B is, A marshall proxy
interface of B to STA
How would A know it's supposed to do that, and why should it?
A is registered as an MTA component, and expects to be called on an MTA
thread. Why should it go out of its way to help you misuse it?
If you, as a client, also want to use B, just create your own instance
and marshal it any way you see fit. Again, the B pointer A holds is an
internal implementation detail of A, of which you shouldn't know nor
care. As long as you use A correctly, everything just works.
Do you think this solution ok?
No, it makes no sense to me at all.
--
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