A
Adam Clauss
First, I have ComVisible set to true for the entire assembly.
I have (abstract) base class A.
There are interfaces IA and IAEvents for accessing properties of this object
and exposing events.
[ClassInterface(ClassInterfaceType.None),
ComSourceInterfaces(typeof(IAEvents))
public abstract class A : IA
{
....
}
I then have a derived class B and an interface IB (IB also derives from IA).
public class B : A, IB
{
....
}
Given an instantiation of B, I can access (from COM) properties/methods
defined in either IA or IB.
However, when I then add a IBEvents (deriving from IAEvents) and change
class B to:
[ClassInterface(ClassInterfaceType.None),
ComSourceInterfaces(typeof(IBEvents))
public class B : A, IB
{
....
}
I can no longer access methods/properties defined from A/IA. Only those
defined at the B level. Is there some wierd trick with regards to
inheritance and COM that is preventing this? Is it still possible to do
what I want? I intend to have a great many classes deriving from A each with
their own unique set of properties and events in addition to the 'base' ones
defined in A. Ideas?
I have (abstract) base class A.
There are interfaces IA and IAEvents for accessing properties of this object
and exposing events.
[ClassInterface(ClassInterfaceType.None),
ComSourceInterfaces(typeof(IAEvents))
public abstract class A : IA
{
....
}
I then have a derived class B and an interface IB (IB also derives from IA).
public class B : A, IB
{
....
}
Given an instantiation of B, I can access (from COM) properties/methods
defined in either IA or IB.
However, when I then add a IBEvents (deriving from IAEvents) and change
class B to:
[ClassInterface(ClassInterfaceType.None),
ComSourceInterfaces(typeof(IBEvents))
public class B : A, IB
{
....
}
I can no longer access methods/properties defined from A/IA. Only those
defined at the B level. Is there some wierd trick with regards to
inheritance and COM that is preventing this? Is it still possible to do
what I want? I intend to have a great many classes deriving from A each with
their own unique set of properties and events in addition to the 'base' ones
defined in A. Ideas?