1

Topic: the interface

Whether
there is a possibility of Aggregirovat means ATL the separate interface (the real pointer on   implemented what - or a class) instead of all COM a class?


1) There is Interface IAint: someone (3rd party) creates COM  which  this interface and pulls my method transferring as parameter the pointer to this interface.


2) I Want  this interface IAint the CoClass th: I want to palm off the COM  on other clients as ostensibly  IAint (actually all QueryInterface on IAint I will give on come from the outside  the interface implemented 3rd party.


3) to Change 3rd party - I can not.

2

Re: the interface

Hello, oncer, you wrote:

Whether O> there is a possibility of Aggregirovat means ATL the separate interface (the real pointer on   implemented what - or a class) instead of all COM a class?

O> 1) There is Interface IAint: someone (3rd party) creates COM  which  this interface and pulls my method transferring as parameter the pointer to this interface.
O> 2) I Want  this interface IAint the CoClass th: I want to palm off the COM  on other clients as ostensibly  IAint (actually all QueryInterface on IAint I will give on come from the outside  the interface implemented 3rd party.
O> 3) to Change 3rd party  I can not.


To aggregate - is not present, because aggregation appears at creation COM  to which
at creation the exterior controlling CATFISH object (parameter LPUNKNOWN pUnkOuter is transferred). And these two objects start to work as one object. In your case, the CATFISH the object is already created, so the miracle will not be.


And here to delegate - it is possible, but difficult to emulate all methods of interface IAint.


Aggregate object
A COM object that is made up of one or more other COM objects. One object in the aggregate is designated the controlling object, which controls which interfaces in the aggregate are exposed and which are private. This controlling object has a special implementation of IUnknown called the controlling IUnknown. All objects in the aggregate must pass calls to IUnknown methods through the controlling IUnknown.
See also
Aggregation.
Aggregation
A composition technique for implementing COM objects. It allows you to build a new object by reusing one or more existing objects' interface implementations. The aggregate object chooses which interfaces to expose to clients, and the interfaces are exposed as if they were implemented by the aggregate object. Clients of the aggregate object communicate only with the aggregate object. See also Aggregate object.
Contrast with
Containment.
Containment
A composition technique for implementing COM objects. It allows one object to reuse some or all of the interface implementations of one or more other objects. The outer object acts as a client to the other objects, delegating implementation when it wishes to use the services of one of the contained objects.
Contrast with
Aggregation.