P
pierre.k
Hello,
does anyone know if there is a way to expose a .NET interface to COM
as such? Suppose I have code like this:
[ComVisible(true)]
[Guid("....")]
interface IMyInterface {
void Method1();
void Method2();
}
but that does not expose this interface to COM clients, which is
logical, because there is no named identifier specified (.NET does not
allow me to specify [ProgID("...")] attribute to provide a name for
the interface as it does for classes).
Now, I can easily create a .NET class, make it ComVisible and specify
IMyInterface as the default interface. In this case, I can access this
interface by COM clients. But I want the client to see IMyInterface as
such, and possibly let an external COM class (say written in VB6)
implement it. Can this be done?
Thanks in advance for your help,
pierre_k.
does anyone know if there is a way to expose a .NET interface to COM
as such? Suppose I have code like this:
[ComVisible(true)]
[Guid("....")]
interface IMyInterface {
void Method1();
void Method2();
}
but that does not expose this interface to COM clients, which is
logical, because there is no named identifier specified (.NET does not
allow me to specify [ProgID("...")] attribute to provide a name for
the interface as it does for classes).
Now, I can easily create a .NET class, make it ComVisible and specify
IMyInterface as the default interface. In this case, I can access this
interface by COM clients. But I want the client to see IMyInterface as
such, and possibly let an external COM class (say written in VB6)
implement it. Can this be done?
Thanks in advance for your help,
pierre_k.