igor.r...@gmail.com
unread,Oct 28, 2012, 6:47:25 AM10/28/12You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
I've got an in-proc COM server (dll, built in MSVC10), which is used in a C# client. One of the interfaces is defined like this:
[
object,
uuid(some guid),
dual,
nonextensible,
helpstring("IDerived Interface"),
pointer_default(unique)
]
interface IDerived : IBase{
};
The co-class implements both IDerived and IBase (and some other interfaces):
[
uuid(some guid),
helpstring("SomeClass Class"),
noncreatable,
hidden
]
coclass SomeClass
{
[default] interface IDerived;
interface IBase;
// etc.
};
The co-class is apartment-threaded. When an MTA client thread acquires IDerived and tries to call any of its methods (inherited from IBase), it crashes somewhere in proxy/stub. In STA it works well, so I believe IDerived is not marshalled correctly. On the other hand, if I QI IBase explicitly or if I add a method to IDerived, everything works well.
Why isn't IDerived marshalled correctly?