dual interfaces & more than on interface 
Author Message
 dual interfaces & more than on interface

Hi,

I want to create COM-Objects that provide more than
one interface. All the interfaces should be available
by COM _and_ by Automation (dual). The problem is that
I can only get Automation-TypeInfo for on specific interface ...

e.g.
interface IWater : public IDispatch { void Foo1(); };
interface IFire : public IDispatch (void Foo2(); };
class Element : public IWater , public IFire { ... };
The Dispatch interface for the Element-class should support
the functions Foo1() & Foo2().

Did anyone knows a solution for that problem ?

Thank you.

Lutz Roeder, Project IMAGO



Sat, 11 Mar 2000 03:00:00 GMT  
 dual interfaces & more than on interface

Quote:

> Hi,

> I want to create COM-Objects that provide more than
> one interface. All the interfaces should be available
> by COM _and_ by Automation (dual). The problem is that
> I can only get Automation-TypeInfo for on specific interface ...

> e.g.
> interface IWater : public IDispatch { void Foo1(); };
> interface IFire : public IDispatch (void Foo2(); };
> class Element : public IWater , public IFire { ... };
> The Dispatch interface for the Element-class should support
> the functions Foo1() & Foo2().

> Did anyone knows a solution for that problem ?

The answer is no, it makes sence to have only one interface derived from
IDispatch.
If a client come to ask for IDispatch interface to use automation, which
are you going to return, in your QueryInterface if he asked for IWater
he gets Water interface, same for IFire, however if he askes for
IDispatch, what do you do. If you realy want automation and custom, then
you can have an IDispatch with all the methods as in IWater and IFire,
and have a custom of IWater, same for IFire.


Sat, 18 Mar 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Can't use my dual interface

2. dual or custom interface

3. Automation support for dual interfaces

4. out parameters in dual interface

5. run time error when passing a pointer to struct for a dual interface

6. Dual Interfaces

7. Evasion of broken IDispatch in dual interface

8. Multiple Dual Interfaces??

9. Reuse a dual interface in another idl file.

10. Multiple Dual Interfaces??

11. Multiple Dual Interfaces??

12. Question on Dual interface?????

 

 
Powered by phpBB® Forum Software