makefiles: Don't use standard libs for programs that specify -nodefaultlibs.
[wine/zf.git] / dlls / ieframe / shelluihelper.c
blobcc636f6bdbc8764163c03efbb0ce3a6c8ca6f7ff
1 /*
2 * Copyright 2012 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include "ieframe.h"
21 #include "wine/debug.h"
23 WINE_DEFAULT_DEBUG_CHANNEL(ieframe);
25 struct ShellUIHelper {
26 IShellUIHelper2 IShellUIHelper2_iface;
27 LONG ref;
30 static inline ShellUIHelper *impl_from_IShellUIHelper2(IShellUIHelper2 *iface)
32 return CONTAINING_RECORD(iface, ShellUIHelper, IShellUIHelper2_iface);
35 static HRESULT WINAPI ShellUIHelper2_QueryInterface(IShellUIHelper2 *iface, REFIID riid, void **ppv)
37 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
39 if(IsEqualGUID(&IID_IUnknown, riid)) {
40 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
41 *ppv = &This->IShellUIHelper2_iface;
42 }else if(IsEqualGUID(&IID_IDispatch, riid)) {
43 TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
44 *ppv = &This->IShellUIHelper2_iface;
45 }else if(IsEqualGUID(&IID_IShellUIHelper, riid)) {
46 TRACE("(%p)->(IID_IShellUIHelper %p)\n", This, ppv);
47 *ppv = &This->IShellUIHelper2_iface;
48 }else if(IsEqualGUID(&IID_IShellUIHelper2, riid)) {
49 TRACE("(%p)->(IID_IShellUIHelper2 %p)\n", This, ppv);
50 *ppv = &This->IShellUIHelper2_iface;
51 }else {
52 WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
53 *ppv = NULL;
54 return E_NOINTERFACE;
57 IUnknown_AddRef((IUnknown*)*ppv);
58 return S_OK;
61 static ULONG WINAPI ShellUIHelper2_AddRef(IShellUIHelper2 *iface)
63 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
64 LONG ref = InterlockedIncrement(&This->ref);
66 TRACE("(%p) ref=%d\n", This, ref);
68 return ref;
71 static ULONG WINAPI ShellUIHelper2_Release(IShellUIHelper2 *iface)
73 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
74 LONG ref = InterlockedDecrement(&This->ref);
76 TRACE("(%p) ref=%d\n", This, ref);
78 if(!ref)
79 heap_free(This);
81 return ref;
84 static HRESULT WINAPI ShellUIHelper2_GetTypeInfoCount(IShellUIHelper2 *iface, UINT *pctinfo)
86 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
88 TRACE("(%p)->(%p)\n", This, pctinfo);
90 *pctinfo = 1;
91 return S_OK;
94 static HRESULT WINAPI ShellUIHelper2_GetTypeInfo(IShellUIHelper2 *iface, UINT iTInfo, LCID lcid, LPTYPEINFO *ppTInfo)
96 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
97 FIXME("(%p)->(%d %d %p)\n", This, iTInfo, lcid, ppTInfo);
98 return E_NOTIMPL;
101 static HRESULT WINAPI ShellUIHelper2_GetIDsOfNames(IShellUIHelper2 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames,
102 LCID lcid, DISPID *rgDispId)
104 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
105 unsigned i;
107 FIXME("(%p)->(%s %p %d %d %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
108 for(i = 0; i < cNames; i++)
109 FIXME("%s\n", debugstr_w(rgszNames[i]));
111 return DISP_E_UNKNOWNNAME;
114 static HRESULT WINAPI ShellUIHelper2_Invoke(IShellUIHelper2 *iface, DISPID dispIdMember,
115 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult,
116 EXCEPINFO *pExepInfo, UINT *puArgErr)
118 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
119 FIXME("(%p)->(%d %s %d %08x %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
120 lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr);
121 return E_NOTIMPL;
124 static HRESULT WINAPI ShellUIHelper2_ResetFirstBootMode(IShellUIHelper2 *iface)
126 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
127 FIXME("(%p)->()\n", This);
128 return E_NOTIMPL;
131 static HRESULT WINAPI ShellUIHelper2_ResetSafeMode(IShellUIHelper2 *iface)
133 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
134 FIXME("(%p)->()\n", This);
135 return E_NOTIMPL;
138 static HRESULT WINAPI ShellUIHelper2_RefreshOfflineDesktop(IShellUIHelper2 *iface)
140 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
141 FIXME("(%p)->()\n", This);
142 return E_NOTIMPL;
145 static HRESULT WINAPI ShellUIHelper2_AddFavourite(IShellUIHelper2 *iface, BSTR URL, VARIANT *Title)
147 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
148 FIXME("(%p)->(%s %s)\n", This, debugstr_w(URL), debugstr_variant(Title));
149 return E_NOTIMPL;
152 static HRESULT WINAPI ShellUIHelper2_AddChannel(IShellUIHelper2 *iface, BSTR URL)
154 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
155 FIXME("(%p)->(%s)\n", This, debugstr_w(URL));
156 return E_NOTIMPL;
159 static HRESULT WINAPI ShellUIHelper2_AddDesktopComponent(IShellUIHelper2 *iface, BSTR URL, BSTR Type,
160 VARIANT *Left, VARIANT *Top, VARIANT *Width, VARIANT *Height)
162 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
163 FIXME("(%p)->(%s %s %s %s %s %s)\n", This, debugstr_w(URL), debugstr_w(Type), debugstr_variant(Left),
164 debugstr_variant(Top), debugstr_variant(Width), debugstr_variant(Height));
165 return E_NOTIMPL;
168 static HRESULT WINAPI ShellUIHelper2_IsSubscribed(IShellUIHelper2 *iface, BSTR URL, VARIANT_BOOL *pBool)
170 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
171 FIXME("(%p)->(%s %p)\n", This, debugstr_w(URL), pBool);
172 return E_NOTIMPL;
175 static HRESULT WINAPI ShellUIHelper2_NavigateAndFind(IShellUIHelper2 *iface, BSTR URL, BSTR strQuery, VARIANT *varTargetFrame)
177 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
178 FIXME("(%p)->(%s %s %s)\n", This, debugstr_w(URL), debugstr_w(strQuery), debugstr_variant(varTargetFrame));
179 return E_NOTIMPL;
182 static HRESULT WINAPI ShellUIHelper2_ImportExportFavourites(IShellUIHelper2 *iface, VARIANT_BOOL fImport, BSTR strImpExpPath)
184 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
185 FIXME("(%p)->(%x %s)\n", This, fImport, debugstr_w(strImpExpPath));
186 return E_NOTIMPL;
189 static HRESULT WINAPI ShellUIHelper2_AutoCompleteSaveForm(IShellUIHelper2 *iface, VARIANT *Form)
191 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
192 FIXME("(%p)->(%s)\n", This, debugstr_variant(Form));
193 return E_NOTIMPL;
196 static HRESULT WINAPI ShellUIHelper2_AutoScan(IShellUIHelper2 *iface, BSTR strSearch, BSTR strFailureUrl, VARIANT *pvarTargetFrame)
198 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
199 FIXME("(%p)->(%s %s %s)\n", This, debugstr_w(strSearch), debugstr_w(strFailureUrl), debugstr_variant(pvarTargetFrame));
200 return E_NOTIMPL;
203 static HRESULT WINAPI ShellUIHelper2_AutoCompleteAttach(IShellUIHelper2 *iface, VARIANT *Reserved)
205 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
206 FIXME("(%p)->(%s)\n", This, debugstr_variant(Reserved));
207 return E_NOTIMPL;
210 static HRESULT WINAPI ShellUIHelper2_ShowBrowserUI(IShellUIHelper2 *iface, BSTR bstrName, VARIANT *pvarIn, VARIANT *pvarOut)
212 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
213 FIXME("(%p)->(%s %s %p)\n", This, debugstr_w(bstrName), debugstr_variant(pvarIn), pvarOut);
214 return E_NOTIMPL;
217 static HRESULT WINAPI ShellUIHelper2_AddSearchProvider(IShellUIHelper2 *iface, BSTR URL)
219 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
220 FIXME("(%p)->(%s)\n", This, debugstr_w(URL));
221 return E_NOTIMPL;
224 static HRESULT WINAPI ShellUIHelper2_RunOnceShown(IShellUIHelper2 *iface)
226 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
227 FIXME("(%p)->()\n", This);
228 return E_NOTIMPL;
231 static HRESULT WINAPI ShellUIHelper2_SkipRunOnce(IShellUIHelper2 *iface)
233 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
234 FIXME("(%p)->()\n", This);
235 return E_NOTIMPL;
238 static HRESULT WINAPI ShellUIHelper2_CustomizeSettings(IShellUIHelper2 *iface, VARIANT_BOOL fSQM,
239 VARIANT_BOOL fPhishing, BSTR bstrLocale)
241 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
242 FIXME("(%p)->(%x %x %s)\n", This, fSQM, fPhishing, debugstr_w(bstrLocale));
243 return E_NOTIMPL;
246 static HRESULT WINAPI ShellUIHelper2_SqmEnabled(IShellUIHelper2 *iface, VARIANT_BOOL *pfEnabled)
248 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
249 FIXME("(%p)->(%p)\n", This, pfEnabled);
250 return E_NOTIMPL;
253 static HRESULT WINAPI ShellUIHelper2_PhishingEnabled(IShellUIHelper2 *iface, VARIANT_BOOL *pfEnabled)
255 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
256 FIXME("(%p)->(%p)\n", This, pfEnabled);
257 return E_NOTIMPL;
260 static HRESULT WINAPI ShellUIHelper2_BrandImageUri(IShellUIHelper2 *iface, BSTR *pbstrUri)
262 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
263 FIXME("(%p)->(%p)\n", This, pbstrUri);
264 return E_NOTIMPL;
267 static HRESULT WINAPI ShellUIHelper2_SkipTabsWelcome(IShellUIHelper2 *iface)
269 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
270 FIXME("(%p)->()\n", This);
271 return E_NOTIMPL;
274 static HRESULT WINAPI ShellUIHelper2_DiagnoseConnection(IShellUIHelper2 *iface)
276 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
277 FIXME("(%p)->()\n", This);
278 return E_NOTIMPL;
281 static HRESULT WINAPI ShellUIHelper2_CustomizeClearType(IShellUIHelper2 *iface, VARIANT_BOOL fSet)
283 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
284 FIXME("(%p)->(%x)\n", This, fSet);
285 return E_NOTIMPL;
288 static HRESULT WINAPI ShellUIHelper2_IsSearchProviderInstalled(IShellUIHelper2 *iface, BSTR URL, DWORD *pdwResult)
290 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
291 FIXME("(%p)->(%s %p)\n", This, debugstr_w(URL), pdwResult);
292 return E_NOTIMPL;
295 static HRESULT WINAPI ShellUIHelper2_IsSearchMigrated(IShellUIHelper2 *iface, VARIANT_BOOL *pfMigrated)
297 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
298 FIXME("(%p)->(%p)\n", This, pfMigrated);
299 return E_NOTIMPL;
302 static HRESULT WINAPI ShellUIHelper2_DefaultSearchProvider(IShellUIHelper2 *iface, BSTR *pbstrName)
304 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
305 FIXME("(%p)->(%p)\n", This, pbstrName);
306 return E_NOTIMPL;
309 static HRESULT WINAPI ShellUIHelper2_RunOnceRequiredSettingsComplete(IShellUIHelper2 *iface, VARIANT_BOOL fComplete)
311 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
312 FIXME("(%p)->(%x)\n", This, fComplete);
313 return E_NOTIMPL;
316 static HRESULT WINAPI ShellUIHelper2_RunOnceHasShown(IShellUIHelper2 *iface, VARIANT_BOOL *pfShown)
318 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
319 FIXME("(%p)->(%p)\n", This, pfShown);
320 return E_NOTIMPL;
323 static HRESULT WINAPI ShellUIHelper2_SearchGuideUrl(IShellUIHelper2 *iface, BSTR *pbstrUrl)
325 ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
326 FIXME("(%p)->(%p)\n", This, pbstrUrl);
327 return E_NOTIMPL;
330 static const IShellUIHelper2Vtbl ShellUIHelper2Vtbl = {
331 ShellUIHelper2_QueryInterface,
332 ShellUIHelper2_AddRef,
333 ShellUIHelper2_Release,
334 ShellUIHelper2_GetTypeInfoCount,
335 ShellUIHelper2_GetTypeInfo,
336 ShellUIHelper2_GetIDsOfNames,
337 ShellUIHelper2_Invoke,
338 ShellUIHelper2_ResetFirstBootMode,
339 ShellUIHelper2_ResetSafeMode,
340 ShellUIHelper2_RefreshOfflineDesktop,
341 ShellUIHelper2_AddFavourite,
342 ShellUIHelper2_AddChannel,
343 ShellUIHelper2_AddDesktopComponent,
344 ShellUIHelper2_IsSubscribed,
345 ShellUIHelper2_NavigateAndFind,
346 ShellUIHelper2_ImportExportFavourites,
347 ShellUIHelper2_AutoCompleteSaveForm,
348 ShellUIHelper2_AutoScan,
349 ShellUIHelper2_AutoCompleteAttach,
350 ShellUIHelper2_ShowBrowserUI,
351 ShellUIHelper2_AddSearchProvider,
352 ShellUIHelper2_RunOnceShown,
353 ShellUIHelper2_SkipRunOnce,
354 ShellUIHelper2_CustomizeSettings,
355 ShellUIHelper2_SqmEnabled,
356 ShellUIHelper2_PhishingEnabled,
357 ShellUIHelper2_BrandImageUri,
358 ShellUIHelper2_SkipTabsWelcome,
359 ShellUIHelper2_DiagnoseConnection,
360 ShellUIHelper2_CustomizeClearType,
361 ShellUIHelper2_IsSearchProviderInstalled,
362 ShellUIHelper2_IsSearchMigrated,
363 ShellUIHelper2_DefaultSearchProvider,
364 ShellUIHelper2_RunOnceRequiredSettingsComplete,
365 ShellUIHelper2_RunOnceHasShown,
366 ShellUIHelper2_SearchGuideUrl
369 HRESULT create_shell_ui_helper(IShellUIHelper2 **_ret)
371 ShellUIHelper *ret;
373 ret = heap_alloc(sizeof(*ret));
374 if(!ret)
375 return E_OUTOFMEMORY;
377 ret->IShellUIHelper2_iface.lpVtbl = &ShellUIHelper2Vtbl;
378 ret->ref = 1;
380 *_ret = &ret->IShellUIHelper2_iface;
381 return S_OK;