Inclusive and polymerization is a mechanism for COM to implement component multiplexing, which is similar to inheritance.
When an assembly (external component) is inserted to another component (internal component), the external component contains a pointer to an internal component interface, and re-implements this interface for its customer call. In this interface re-implemented, the external components simply forward the call request to the internal components. The accommodation is relatively simple, and this article focuses on aggregation.
When an external component aggregates the internal components, the external component does not reform the interface of the internal components and the call forwarding, but the pointer to the internal component interface directly returns to the customer, so that the customer can directly deal with the internal components. However, it is necessary to ensure that customers cannot access the IUNKNOWN interface of the internal components, and it is not necessary to make customers know that it is interacting with another component - the so-called internal components, otherwise everything will become very confusing. ......
Download Full Text 60K
The hoses are letter:
Wonderful, hello!
The expectations of your website are very good, and now you are receiving an example program and code, in order to support.
Due to the excessive development task, this article is under discontinuation of this year to make this look, and the mistake is still awkward! The sample program only does the description of the principle, and there are no practicality. I will use the MFC and ATL to make a practical communication component, which means that implementation technology, and a certain reference value.
Only everyone's common improvement is true.
Cause
ceremony!