2 * Implementation of IProvideClassInfo interfaces for IE Web Browser control
4 * Copyright 2001 John R. Sheets (for CodeWeavers)
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #include "wine/debug.h"
25 WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
27 /**********************************************************************
28 * Implement the IProvideClassInfo interface
30 * FIXME: Should we just pass in the IProvideClassInfo2 methods rather
31 * reimplementing them here?
34 static HRESULT WINAPI WBPCI_QueryInterface(LPPROVIDECLASSINFO iface,
35 REFIID riid, LPVOID *ppobj)
37 ICOM_THIS(IProvideClassInfoImpl, iface);
39 FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
43 static ULONG WINAPI WBPCI_AddRef(LPPROVIDECLASSINFO iface)
45 ICOM_THIS(IProvideClassInfoImpl, iface);
51 static ULONG WINAPI WBPCI_Release(LPPROVIDECLASSINFO iface)
53 ICOM_THIS(IProvideClassInfoImpl, iface);
55 /* static class, won't be freed */
60 /* Return an ITypeInfo interface to retrieve type library info about
63 static HRESULT WINAPI WBPCI_GetClassInfo(LPPROVIDECLASSINFO iface, LPTYPEINFO *ppTI)
65 FIXME("stub: LPTYPEINFO = %p\n", *ppTI);
69 /**********************************************************************
70 * IProvideClassInfo virtual function table for IE Web Browser component
73 static ICOM_VTABLE(IProvideClassInfo) WBPCI_Vtbl =
75 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
82 IProvideClassInfoImpl SHDOCVW_ProvideClassInfo = { &WBPCI_Vtbl, 1 };
85 /**********************************************************************
86 * Implement the IProvideClassInfo2 interface (inherits from
90 static HRESULT WINAPI WBPCI2_QueryInterface(LPPROVIDECLASSINFO2 iface,
91 REFIID riid, LPVOID *ppobj)
93 ICOM_THIS(IProvideClassInfo2Impl, iface);
95 FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
99 static ULONG WINAPI WBPCI2_AddRef(LPPROVIDECLASSINFO2 iface)
101 ICOM_THIS(IProvideClassInfo2Impl, iface);
104 return ++(This->ref);
107 static ULONG WINAPI WBPCI2_Release(LPPROVIDECLASSINFO2 iface)
109 ICOM_THIS(IProvideClassInfo2Impl, iface);
111 /* static class, won't be freed */
113 return --(This->ref);
116 /* Return an ITypeInfo interface to retrieve type library info about
119 static HRESULT WINAPI WBPCI2_GetClassInfo(LPPROVIDECLASSINFO2 iface, LPTYPEINFO *ppTI)
121 FIXME("stub: LPTYPEINFO = %p\n", *ppTI);
125 /* Get the IID for generic default event callbacks. This IID will
126 * in theory be used to later query for an IConnectionPoint to connect
127 * an event sink (callback implmentation in the OLE control site)
130 static HRESULT WINAPI WBPCI2_GetGUID(LPPROVIDECLASSINFO2 iface,
131 DWORD dwGuidKind, GUID *pGUID)
133 FIXME("stub: dwGuidKind = %ld, pGUID = %s\n", dwGuidKind, debugstr_guid(pGUID));
135 if (dwGuidKind != GUIDKIND_DEFAULT_SOURCE_DISP_IID)
137 FIXME ("Requested unsupported GUID type: %ld\n", dwGuidKind);
138 return E_FAIL; /* Is there a better return type here? */
141 /* FIXME: Returning IPropertyNotifySink interface, but should really
142 * return a more generic event set (???) dispinterface.
143 * However, this hack, allows a control site to return with success
144 * (MFC's COleControlSite falls back to older IProvideClassInfo interface
145 * if GetGUID() fails to return a non-NULL GUID).
147 memcpy(pGUID, &IID_IPropertyNotifySink, sizeof(GUID));
148 FIXME("Wrongly returning IPropertyNotifySink interface %s\n",
149 debugstr_guid(pGUID));
154 /**********************************************************************
155 * IProvideClassInfo virtual function table for IE Web Browser component
158 static ICOM_VTABLE(IProvideClassInfo2) WBPCI2_Vtbl =
160 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
161 WBPCI2_QueryInterface,
168 IProvideClassInfo2Impl SHDOCVW_ProvideClassInfo2 = { &WBPCI2_Vtbl, 1 };