> Is this the only solution? Unfortunatly in our case we can't do this.
Dmytro,
>> why can't you introduce an additional facade class
Since we have too much of such classes, the creation of additional
facade classes will make our solution rather chaotic. And, of course,
this is a performance issue.
>>Yes, this is the only one I can think of
What about marshalling IEnumVariant manually?
What is magical about derivatives of the MarshalByRefObject class?
Dmytro Lapshyn [MVP] - 26 Apr 2006 10:13 GMT
> Since we have too much of such classes, the creation of additional
> facade classes will make our solution rather chaotic. And, of course,
> this is a performance issue.
OK this makes sense.
> What about marshalling IEnumVariant manually?
This can be done, but I haven't seen yet anyone in person who would
sucessfully create a custom marshaler. Still, it is worth a try if nothing
else helps.
> What is magical about derivatives of the MarshalByRefObject class?
I think the fact that a class is derived from MarshalByRefObject directly
affects the underlying marshaling code. I am not sure why it affects COM
Interop marshaling though (might have something to do with DCOM). Think of
it as of a "marker interface" - once you derive from it, you declare you
want a certain treatment for your class.
Here's a blog post which delves really deep into the implementation details:
http://blogs.msdn.com/cbrumme/archive/2003/07/14/51495.aspx
> Dmytro,
>
[quoted text clipped - 7 lines]
>
> What is magical about derivatives of the MarshalByRefObject class?