Connection Point Container

The server can implement an IConnectionPointContainer class to dispense connection point objects. Listing 6.4 shows the definition of the IConnectionPointContainer interface.

Code Listing 6.4. Definition of the IConnectionPointContainer Interface
interface IConnectionPointContainer : IUnknown
{
  HRESULT EnumConnectionPoints(
    [out] IEnumConnectionPoints ** ppEnum);
  HRESULT FindConnectionPoint([in] REFIID riid,
    [out] IConnectionPoint ** ppCP);
}

The IConnectionPointContainer::FindConnectionPoint() method returns the IConnectionPoint object that services a particular interface identifier.

The IEnumConnectionPoints object is a standard enumeration class. Listing 6.5 shows the definition of the IEnumConnectionPoints

Get COM+ Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.