COM and derived interface
Hi,
I'm trying to create an interface IPerso that is derived from an Interface IInt2. The problem is that IInt 2 is derived from IInt 1 and so VB 6.0 do not compile my dll because IInt 2 does not derived from IDispatch or IUnknown. How can I go through this problem?
Thanks for your help
Re: COM and derived interface
Interesting problem. Do you have a reference to IInt1 in your project?
Software is like sex, it's better when it's free - Linus Torvalds
Software is like sex, it's better when I get paid for it. - me
Re: COM and derived interface
Yes, IInt1 and IInt2 are described into a dll that is included as a reference for the project.
Re: COM and derived interface
There is a way to do it, I believe. It just isn't easy. There is a technique called vtbl swapping that might help. I'd have to dig up the book I read it in. I think Matt Curland's book Advanced VB 6 http://www.powervb.com explains this technique.
It's too bad COM interfaces can't inherit from multiple interfaces, ala
[vccode]
interface IInt2 : IInt1 : IDispatch {}
[/vccode]
Software is like sex, it's better when it's free - Linus Torvalds
Software is like sex, it's better when I get paid for it. - me
Re: COM and derived interface
Thank you,
I get the same conclusion, it is not possible to do it this with vb6.0. I have read that wit visual basic .net, this case is possible, I'm going to try it...
Thanks for all
Yoann