VC++ ATL/COM - Step 3.2 Adding a COM Interface - Aggregation
3.2 Aggregation
Yes: This is by default. You have the freedom to pass a NULL pointer or a valid IUnknown interface while creating this COM Component.
No: You can not pass outer IUnknown while creating this component. If you do so, you will get an error message.
Only: You need to pass Outer IUnknown interface pointer in order to create this object.
If you have chosen the Aggregation as NO, then you can find the following line of code:
DECLARE_NOT_AGGREGATABLE(CMathCtrl)
If you have chosen the Aggregation as YES, then you can find the following line of code:
DECLARE_ONLY_AGGREGATABLE(CMathCtrl)
Click here to download the complete source code of COM DLL Server, C++ Client and CSharp Client
|