2 * Implementation of event-related interfaces for IE Web Browser control:
4 * - IConnectionPointContainer
7 * 2001 John R. Sheets (for CodeWeavers)
11 #include "debugtools.h"
14 DEFAULT_DEBUG_CHANNEL(shdocvw
);
17 /**********************************************************************
18 * Implement the IConnectionPointContainer interface
21 static HRESULT WINAPI
WBCPC_QueryInterface(LPCONNECTIONPOINTCONTAINER iface
,
22 REFIID riid
, LPVOID
*ppobj
)
24 ICOM_THIS(IConnectionPointContainerImpl
, iface
);
26 FIXME("(%p)->(%s,%p),stub!\n", This
, debugstr_guid(riid
), ppobj
);
30 static ULONG WINAPI
WBCPC_AddRef(LPCONNECTIONPOINTCONTAINER iface
)
32 ICOM_THIS(IConnectionPointContainerImpl
, iface
);
38 static ULONG WINAPI
WBCPC_Release(LPCONNECTIONPOINTCONTAINER iface
)
40 ICOM_THIS(IConnectionPointContainerImpl
, iface
);
42 /* static class, won't be freed */
47 /* Get a list of connection points inside this container. */
48 static HRESULT WINAPI
WBCPC_EnumConnectionPoints(LPCONNECTIONPOINTCONTAINER iface
,
49 LPENUMCONNECTIONPOINTS
*ppEnum
)
51 FIXME("stub: IEnumConnectionPoints = %p\n", *ppEnum
);
55 /* Retrieve the connection point in this container associated with the
56 * riid interface. When events occur in the control, the control can
57 * call backwards into its embedding site, through these interfaces.
59 static HRESULT WINAPI
WBCPC_FindConnectionPoint(LPCONNECTIONPOINTCONTAINER iface
,
60 REFIID riid
, LPCONNECTIONPOINT
*ppCP
)
62 TRACE(": IID = %s, IConnectionPoint = %p\n", debugstr_guid(riid
), *ppCP
);
64 /* For now, return the same IConnectionPoint object for both
65 * event interface requests.
67 if (IsEqualGUID (&IID_INotifyDBEvents
, riid
))
69 TRACE("Returning connection point %p for IID_INotifyDBEvents\n",
70 &SHDOCVW_ConnectionPoint
);
71 *ppCP
= (LPCONNECTIONPOINT
)&SHDOCVW_ConnectionPoint
;
74 else if (IsEqualGUID (&IID_IPropertyNotifySink
, riid
))
76 TRACE("Returning connection point %p for IID_IPropertyNotifySink\n",
77 &SHDOCVW_ConnectionPoint
);
78 *ppCP
= (LPCONNECTIONPOINT
)&SHDOCVW_ConnectionPoint
;
85 /**********************************************************************
86 * IConnectionPointContainer virtual function table for IE Web Browser component
89 static ICOM_VTABLE(IConnectionPointContainer
) WBCPC_Vtbl
=
91 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
95 WBCPC_EnumConnectionPoints
,
96 WBCPC_FindConnectionPoint
99 IConnectionPointContainerImpl SHDOCVW_ConnectionPointContainer
= { &WBCPC_Vtbl
, 1 };
102 /**********************************************************************
103 * Implement the IConnectionPoint interface
106 static HRESULT WINAPI
WBCP_QueryInterface(LPCONNECTIONPOINT iface
,
107 REFIID riid
, LPVOID
*ppobj
)
109 ICOM_THIS(IConnectionPointImpl
, iface
);
111 FIXME("(%p)->(%s,%p),stub!\n", This
, debugstr_guid(riid
), ppobj
);
112 return E_NOINTERFACE
;
115 static ULONG WINAPI
WBCP_AddRef(LPCONNECTIONPOINT iface
)
117 ICOM_THIS(IConnectionPointImpl
, iface
);
120 return ++(This
->ref
);
123 static ULONG WINAPI
WBCP_Release(LPCONNECTIONPOINT iface
)
125 ICOM_THIS(IConnectionPointImpl
, iface
);
127 /* static class, won't be freed */
129 return --(This
->ref
);
132 static HRESULT WINAPI
WBCP_GetConnectionInterface(LPCONNECTIONPOINT iface
, IID
* pIId
)
134 FIXME("stub: %s\n", debugstr_guid(pIId
));
138 /* Get this connection point's owning container */
139 static HRESULT WINAPI
140 WBCP_GetConnectionPointContainer(LPCONNECTIONPOINT iface
,
141 LPCONNECTIONPOINTCONTAINER
*ppCPC
)
143 FIXME("stub: IConnectionPointContainer = %p\n", *ppCPC
);
147 /* Connect the pUnkSink event-handling implementation (in the control site)
148 * to this connection point. Return a handle to this connection in
149 * pdwCookie (for later use in Unadvise()).
151 static HRESULT WINAPI
WBCP_Advise(LPCONNECTIONPOINT iface
,
152 LPUNKNOWN pUnkSink
, DWORD
*pdwCookie
)
154 static int new_cookie
;
156 FIXME("stub: IUnknown = %p, connection cookie = %ld\n", pUnkSink
, *pdwCookie
);
158 *pdwCookie
= ++new_cookie
;
159 TRACE ("Returning cookie = %ld\n", *pdwCookie
);
164 /* Disconnect this implementation from the connection point. */
165 static HRESULT WINAPI
WBCP_Unadvise(LPCONNECTIONPOINT iface
,
168 FIXME("stub: cookie to disconnect = %ld\n", dwCookie
);
172 /* Get a list of connections in this connection point. */
173 static HRESULT WINAPI
WBCP_EnumConnections(LPCONNECTIONPOINT iface
,
174 LPENUMCONNECTIONS
*ppEnum
)
176 FIXME("stub: IEnumConnections = %p\n", *ppEnum
);
180 /**********************************************************************
181 * IConnectionPoint virtual function table for IE Web Browser component
184 static ICOM_VTABLE(IConnectionPoint
) WBCP_Vtbl
=
186 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
190 WBCP_GetConnectionInterface
,
191 WBCP_GetConnectionPointContainer
,
197 IConnectionPointImpl SHDOCVW_ConnectionPoint
= { &WBCP_Vtbl
, 1 };