Get rid of the WIN_SetRectangles export from user32.
[wine.git] / dlls / shdocvw / classinfo.c
blob1316452172073b3b70bc41df85dc738285a59bc6
1 /*
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
21 #include <stdarg.h>
22 #include <string.h>
24 #include "windef.h"
25 #include "winbase.h"
26 #include "shdocvw.h"
27 #include "wine/debug.h"
29 WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
31 /**********************************************************************
32 * Implement the IProvideClassInfo interface
34 * FIXME: Should we just pass in the IProvideClassInfo2 methods rather
35 * reimplementing them here?
38 static HRESULT WINAPI WBPCI_QueryInterface(LPPROVIDECLASSINFO iface,
39 REFIID riid, LPVOID *ppobj)
41 IProvideClassInfoImpl *This = (IProvideClassInfoImpl *)iface;
43 FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
44 return E_NOINTERFACE;
47 static ULONG WINAPI WBPCI_AddRef(LPPROVIDECLASSINFO iface)
49 IProvideClassInfoImpl *This = (IProvideClassInfoImpl *)iface;
51 TRACE("\n");
52 return ++(This->ref);
55 static ULONG WINAPI WBPCI_Release(LPPROVIDECLASSINFO iface)
57 IProvideClassInfoImpl *This = (IProvideClassInfoImpl *)iface;
59 /* static class, won't be freed */
60 TRACE("\n");
61 return --(This->ref);
64 /* Return an ITypeInfo interface to retrieve type library info about
65 * this control.
67 static HRESULT WINAPI WBPCI_GetClassInfo(LPPROVIDECLASSINFO iface, LPTYPEINFO *ppTI)
69 FIXME("stub: LPTYPEINFO = %p\n", *ppTI);
70 return S_OK;
73 /**********************************************************************
74 * IProvideClassInfo virtual function table for IE Web Browser component
77 static IProvideClassInfoVtbl WBPCI_Vtbl =
79 WBPCI_QueryInterface,
80 WBPCI_AddRef,
81 WBPCI_Release,
82 WBPCI_GetClassInfo
85 IProvideClassInfoImpl SHDOCVW_ProvideClassInfo = { &WBPCI_Vtbl, 1 };
88 /**********************************************************************
89 * Implement the IProvideClassInfo2 interface (inherits from
90 * IProvideClassInfo).
93 static HRESULT WINAPI WBPCI2_QueryInterface(LPPROVIDECLASSINFO2 iface,
94 REFIID riid, LPVOID *ppobj)
96 IProvideClassInfo2Impl *This = (IProvideClassInfo2Impl *)iface;
98 FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
99 return E_NOINTERFACE;
102 static ULONG WINAPI WBPCI2_AddRef(LPPROVIDECLASSINFO2 iface)
104 IProvideClassInfo2Impl *This = (IProvideClassInfo2Impl *)iface;
106 TRACE("\n");
107 return ++(This->ref);
110 static ULONG WINAPI WBPCI2_Release(LPPROVIDECLASSINFO2 iface)
112 IProvideClassInfo2Impl *This = (IProvideClassInfo2Impl *)iface;
114 /* static class, won't be freed */
115 TRACE("\n");
116 return --(This->ref);
119 /* Return an ITypeInfo interface to retrieve type library info about
120 * this control.
122 static HRESULT WINAPI WBPCI2_GetClassInfo(LPPROVIDECLASSINFO2 iface, LPTYPEINFO *ppTI)
124 FIXME("stub: LPTYPEINFO = %p\n", *ppTI);
125 return S_OK;
128 /* Get the IID for generic default event callbacks. This IID will
129 * in theory be used to later query for an IConnectionPoint to connect
130 * an event sink (callback implementation in the OLE control site)
131 * to this control.
133 static HRESULT WINAPI WBPCI2_GetGUID(LPPROVIDECLASSINFO2 iface,
134 DWORD dwGuidKind, GUID *pGUID)
136 FIXME("stub: dwGuidKind = %ld, pGUID = %s\n", dwGuidKind, debugstr_guid(pGUID));
138 if (dwGuidKind != GUIDKIND_DEFAULT_SOURCE_DISP_IID)
140 FIXME ("Requested unsupported GUID type: %ld\n", dwGuidKind);
141 return E_FAIL; /* Is there a better return type here? */
144 /* FIXME: Returning IPropertyNotifySink interface, but should really
145 * return a more generic event set (???) dispinterface.
146 * However, this hack, allows a control site to return with success
147 * (MFC's COleControlSite falls back to older IProvideClassInfo interface
148 * if GetGUID() fails to return a non-NULL GUID).
150 memcpy(pGUID, &IID_IPropertyNotifySink, sizeof(GUID));
151 FIXME("Wrongly returning IPropertyNotifySink interface %s\n",
152 debugstr_guid(pGUID));
154 return S_OK;
157 /**********************************************************************
158 * IProvideClassInfo virtual function table for IE Web Browser component
161 static IProvideClassInfo2Vtbl WBPCI2_Vtbl =
163 WBPCI2_QueryInterface,
164 WBPCI2_AddRef,
165 WBPCI2_Release,
166 WBPCI2_GetClassInfo,
167 WBPCI2_GetGUID
170 IProvideClassInfo2Impl SHDOCVW_ProvideClassInfo2 = { &WBPCI2_Vtbl, 1 };