What is aggregation? How can we get an interface of the aggregated object?
Aggregation is the reuse mechanism, in which the outer object exposes interfaces from the inner object as if they were implemented on the outer object itself. This is useful when the outer object would always delegate every call to one of its interfaces to the same interface in the inner object. Aggregation is actually a specialized case of containment/delegation, and is available as a convenience to avoid extra implementation overhead in the outer object in these cases. We can get a pointer to the inner interface, calling QueryInterface of the outer object with IID of the inner interface. C is aggregated by B, which in turn aggregated by A. Our client requested C. What will happen? QueryInterface to A will delegate request to B which, in turn, will delegate request for the interface to C. This pointer will be returned to the client. What is a moniker ? An object that implements the IMoniker interface. A moniker acts as a name that uniquely identifies a COM object. In the same way that
Related Questions
- Why am I having an InvalidClassException thrown during the serialization of my object which implements the Externalizable interface?
- What are the difference between an Automation Server and a BOI (Business Object Interface)?
- What is the difference between a bus name, and object path, and an interface?