In questo esempio viene illustrato un oggetto che supporta IPropertyNotifySink come un'interfaccia in uscita
classe CConnect: nbsp; pubblica CComObjectRootEx <CComObjectThreadModel>,
CComCoClass pubblica < collega & CLSID_CConnect >,
pubblica IConnectionPointContainerImpl <CConnect>,
IConnectionPointImpl pubblica < collega & IID_IPropertyNotifySink >
{
pubblica:
...
BEGIN_COM_MAP(cconnect)
COM_INTERFACE_ENTRY_IMPL(IConnectionPointContainer)
END_COM_MAP()
BEGIN_CONNECTION_POINT_MAP(cconnect)
CONNECTION_POINT_ENTRY(IID_IPropertyNotifySink)
END_CONNECTION_POINT_MAP()
...
}
&Notanbsp; Quando si specifica IPropertyNotifySink come un'interfaccia in uscita, è possibile utilizzare la classe IPropertyNotifySinkCP invece di IConnectionPointImpl. Ad esempio:
classe CConnect: nbsp; pubblica CComObjectRootEx <CComObjectThreadModel>,
CComCoClass pubblica < collega & CLSID_CConnect >,
pubblica IConnectionPointContainerImpl <CConnect>,
pubblica IPropertyNotifySinkCP <CConnect>
{
...
}