Repaired shared PE data sections.
[wine/multimedia.git] / dlls / shdocvw / classinfo.c
blob251c0416e1707185ea5b7dedde3ff7a6c2d24e25
1 /*
2 * Implementation of IProvideClassInfo interfaces for IE Web Browser control
4 * 2001 John R. Sheets (for CodeWeavers)
5 */
7 #include <string.h>
8 #include "debugtools.h"
9 #include "shdocvw.h"
11 DEFAULT_DEBUG_CHANNEL(shdocvw);
13 /**********************************************************************
14 * Implement the IProvideClassInfo interface
16 * FIXME: Should we just pass in the IProvideClassInfo2 methods rather
17 * reimplementing them here?
20 static HRESULT WINAPI WBPCI_QueryInterface(LPPROVIDECLASSINFO iface,
21 REFIID riid, LPVOID *ppobj)
23 ICOM_THIS(IProvideClassInfoImpl, iface);
25 FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
26 return E_NOINTERFACE;
29 static ULONG WINAPI WBPCI_AddRef(LPPROVIDECLASSINFO iface)
31 ICOM_THIS(IProvideClassInfoImpl, iface);
33 TRACE("\n");
34 return ++(This->ref);
37 static ULONG WINAPI WBPCI_Release(LPPROVIDECLASSINFO iface)
39 ICOM_THIS(IProvideClassInfoImpl, iface);
41 /* static class, won't be freed */
42 TRACE("\n");
43 return --(This->ref);
46 /* Return an ITypeInfo interface to retrieve type library info about
47 * this control.
49 static HRESULT WINAPI WBPCI_GetClassInfo(LPPROVIDECLASSINFO iface, LPTYPEINFO *ppTI)
51 FIXME("stub: LPTYPEINFO = %p\n", *ppTI);
52 return S_OK;
55 /**********************************************************************
56 * IProvideClassInfo virtual function table for IE Web Browser component
59 static ICOM_VTABLE(IProvideClassInfo) WBPCI_Vtbl =
61 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
62 WBPCI_QueryInterface,
63 WBPCI_AddRef,
64 WBPCI_Release,
65 WBPCI_GetClassInfo
68 IProvideClassInfoImpl SHDOCVW_ProvideClassInfo = { &WBPCI_Vtbl, 1 };
71 /**********************************************************************
72 * Implement the IProvideClassInfo2 interface (inherits from
73 * IProvideClassInfo).
76 static HRESULT WINAPI WBPCI2_QueryInterface(LPPROVIDECLASSINFO2 iface,
77 REFIID riid, LPVOID *ppobj)
79 ICOM_THIS(IProvideClassInfo2Impl, iface);
81 FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
82 return E_NOINTERFACE;
85 static ULONG WINAPI WBPCI2_AddRef(LPPROVIDECLASSINFO2 iface)
87 ICOM_THIS(IProvideClassInfo2Impl, iface);
89 TRACE("\n");
90 return ++(This->ref);
93 static ULONG WINAPI WBPCI2_Release(LPPROVIDECLASSINFO2 iface)
95 ICOM_THIS(IProvideClassInfo2Impl, iface);
97 /* static class, won't be freed */
98 TRACE("\n");
99 return --(This->ref);
102 /* Return an ITypeInfo interface to retrieve type library info about
103 * this control.
105 static HRESULT WINAPI WBPCI2_GetClassInfo(LPPROVIDECLASSINFO2 iface, LPTYPEINFO *ppTI)
107 FIXME("stub: LPTYPEINFO = %p\n", *ppTI);
108 return S_OK;
111 /* Get the IID for generic default event callbacks. This IID will
112 * in theory be used to later query for an IConnectionPoint to connect
113 * an event sink (callback implmentation in the OLE control site)
114 * to this control.
116 static HRESULT WINAPI WBPCI2_GetGUID(LPPROVIDECLASSINFO2 iface,
117 DWORD dwGuidKind, GUID *pGUID)
119 FIXME("stub: dwGuidKind = %ld, pGUID = %s\n", dwGuidKind, debugstr_guid(pGUID));
121 if (dwGuidKind != GUIDKIND_DEFAULT_SOURCE_DISP_IID)
123 FIXME ("Requested unsupported GUID type: %ld\n", dwGuidKind);
124 return E_FAIL; /* Is there a better return type here? */
127 /* FIXME: Returning IPropertyNotifySink interface, but should really
128 * return a more generic event set (???) dispinterface.
129 * However, this hack, allows a control site to return with success
130 * (MFC's COleControlSite falls back to older IProvideClassInfo interface
131 * if GetGUID() fails to return a non-NULL GUID).
133 memcpy(pGUID, &IID_IPropertyNotifySink, sizeof(GUID));
134 FIXME("Wrongly returning IPropertyNotifySink interface %s\n",
135 debugstr_guid(pGUID));
137 return S_OK;
140 /**********************************************************************
141 * IProvideClassInfo virtual function table for IE Web Browser component
144 static ICOM_VTABLE(IProvideClassInfo2) WBPCI2_Vtbl =
146 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
147 WBPCI2_QueryInterface,
148 WBPCI2_AddRef,
149 WBPCI2_Release,
150 WBPCI2_GetClassInfo,
151 WBPCI2_GetGUID
154 IProvideClassInfo2Impl SHDOCVW_ProvideClassInfo2 = { &WBPCI2_Vtbl, 1 };