Connectable Object Interfaces

Support for connectable objects requires support for four interfaces:

The latter two are defined as standard enumerators for the types IConnectionPoint * and CONNECTDATA. See IEnumXxxx for more information on enumerators.

Additionally, the connectable object can optionally support IProvideClassInfo and IProvideClassInfo2 to provide enough information to a client so the client can provide support for the outgoing interface at run-time.

Finally, the client must provide a sink object that implements the outgoing interface which is a custom COM interface defined by the connectable object.

The IConnectionPointContainer, IConnectionPoint, IProvideClassInfo, and IProvideClassInfo2 interfaces are defined as follows:

interface IConnectionPointContainer : IUnknown 
    { 
    HRESULT EnumConnectionPoints([out] IEnumConnectionPoints 
        **ppEnum); 
    HRESULT FindConnectionPoint([in] REFIID riid 
        , [out] IConnectionPoint **ppCP); 
    } 
 
 
interface IConnectionPoint : IUnknown 
    { 
    HRESULT GetConnectionInterface([out] IID *pIID); 
    HRESULT GetConnectionPointContainer([out] 
        IConnectionPointContainer **ppCPC); 
    HRESULT Advise([in] IUnknown *pUnk, [out] DWORD *pdwCookie); 
    HRESULT Unadvise([in] DWORD dwCookie); 
    HRESULT EnumConnections([out] IEnumConnections **ppEnum); 
    } 
 
 
interface IProvideClassInfo : IUnknown 
    { 
    HRESULT GetClassInfo([out] ITypeInfo **ppTI); 
    } 
 
 
interface IProvideClassInfo2 : IProvideClassInfo
    { 
    HRESULT GetGUID( );
    }