PUnkOuter parameter for IClassFactory :: CreateInstance method

What is the reason for the pUnkOuter parameter of the IClassFactory :: CreateInstance method?

 HRESULT CreateInstance( [in] IUnknown *pUnkOuter, [in] REFIID riid, [out] void **ppvObject ); 

Description of the MSDN pUnkOuter parameter pUnkOuter :

If the object is created as part of an aggregate, point to the IUnknown control interface of the aggregate. Otherwise, this parameter must be NULL.

Can you, good people, tell me what this parameter is for?

+4
source share
1 answer

See Aggregation in COM fundamentals. If you create an instance of a COM object that is part of an aggregate, you must provide the so-called "external IUnknown", which is the interface of the owner's COM object.

+4
source

All Articles