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
21 #include "wine/debug.h"
23 WINE_DEFAULT_DEBUG_CHANNEL(ieframe
);
25 struct ShellUIHelper
{
26 IShellUIHelper2 IShellUIHelper2_iface
;
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_IShellUIHelper
, riid
)) {
49 TRACE("(%p)->(IID_IShellUIHelper2 %p)\n", This
, ppv
);
50 *ppv
= &This
->IShellUIHelper2_iface
;
52 WARN("(%p)->(%s %p)\n", This
, debugstr_guid(riid
), ppv
);
57 IUnknown_AddRef((IUnknown
*)*ppv
);
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
);
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
);
84 static HRESULT WINAPI
ShellUIHelper2_GetTypeInfoCount(IShellUIHelper2
*iface
, UINT
*pctinfo
)
86 ShellUIHelper
*This
= impl_from_IShellUIHelper2(iface
);
88 TRACE("(%p)->(%p)\n", This
, pctinfo
);
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
);
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 FIXME("(%p)->(%s %p %d %d %p)\n", This
, debugstr_guid(riid
), rgszNames
, cNames
,
110 static HRESULT WINAPI
ShellUIHelper2_Invoke(IShellUIHelper2
*iface
, DISPID dispIdMember
,
111 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
, VARIANT
*pVarResult
,
112 EXCEPINFO
*pExepInfo
, UINT
*puArgErr
)
114 ShellUIHelper
*This
= impl_from_IShellUIHelper2(iface
);
115 FIXME("(%p)->(%d %s %d %08x %p %p %p %p)\n", This
, dispIdMember
, debugstr_guid(riid
),
116 lcid
, wFlags
, pDispParams
, pVarResult
, pExepInfo
, puArgErr
);
120 static HRESULT WINAPI
ShellUIHelper2_ResetFirstBootMode(IShellUIHelper2
*iface
)
122 ShellUIHelper
*This
= impl_from_IShellUIHelper2(iface
);
123 FIXME("(%p)->()\n", This
);
127 static HRESULT WINAPI
ShellUIHelper2_ResetSafeMode(IShellUIHelper2
*iface
)
129 ShellUIHelper
*This
= impl_from_IShellUIHelper2(iface
);
130 FIXME("(%p)->()\n", This
);
134 static HRESULT WINAPI
ShellUIHelper2_RefreshOfflineDesktop(IShellUIHelper2
*iface
)
136 ShellUIHelper
*This
= impl_from_IShellUIHelper2(iface
);
137 FIXME("(%p)->()\n", This
);
141 static HRESULT WINAPI
ShellUIHelper2_AddFavourite(IShellUIHelper2
*iface
, BSTR URL
, VARIANT
*Title
)
143 ShellUIHelper
*This
= impl_from_IShellUIHelper2(iface
);
144 FIXME("(%p)->(%s %s)\n", This
, debugstr_w(URL
), debugstr_variant(Title
));
148 static HRESULT WINAPI
ShellUIHelper2_AddChannel(IShellUIHelper2
*iface
, BSTR URL
)
150 ShellUIHelper
*This
= impl_from_IShellUIHelper2(iface
);
151 FIXME("(%p)->(%s)\n", This
, debugstr_w(URL
));
155 static HRESULT WINAPI
ShellUIHelper2_AddDesktopComponent(IShellUIHelper2
*iface
, BSTR URL
, BSTR Type
,
156 VARIANT
*Left
, VARIANT
*Top
, VARIANT
*Width
, VARIANT
*Height
)
158 ShellUIHelper
*This
= impl_from_IShellUIHelper2(iface
);
159 FIXME("(%p)->(%s %s %s %s %s %s)\n", This
, debugstr_w(URL
), debugstr_w(Type
), debugstr_variant(Left
),
160 debugstr_variant(Top
), debugstr_variant(Width
), debugstr_variant(Height
));
164 static HRESULT WINAPI
ShellUIHelper2_IsSubscribed(IShellUIHelper2
*iface
, BSTR URL
, VARIANT_BOOL
*pBool
)
166 ShellUIHelper
*This
= impl_from_IShellUIHelper2(iface
);
167 FIXME("(%p)->(%s %p)\n", This
, debugstr_w(URL
), pBool
);
171 static HRESULT WINAPI
ShellUIHelper2_NavigateAndFind(IShellUIHelper2
*iface
, BSTR URL
, BSTR strQuery
, VARIANT
*varTargetFrame
)
173 ShellUIHelper
*This
= impl_from_IShellUIHelper2(iface
);
174 FIXME("(%p)->(%s %s %s)\n", This
, debugstr_w(URL
), debugstr_w(strQuery
), debugstr_variant(varTargetFrame
));
178 static HRESULT WINAPI
ShellUIHelper2_ImportExportFavourites(IShellUIHelper2
*iface
, VARIANT_BOOL fImport
, BSTR strImpExpPath
)
180 ShellUIHelper
*This
= impl_from_IShellUIHelper2(iface
);
181 FIXME("(%p)->(%x %s)\n", This
, fImport
, debugstr_w(strImpExpPath
));
185 static HRESULT WINAPI
ShellUIHelper2_AutoCompleteSaveForm(IShellUIHelper2
*iface
, VARIANT
*Form
)
187 ShellUIHelper
*This
= impl_from_IShellUIHelper2(iface
);
188 FIXME("(%p)->(%s)\n", This
, debugstr_variant(Form
));
192 static HRESULT WINAPI
ShellUIHelper2_AutoScan(IShellUIHelper2
*iface
, BSTR strSearch
, BSTR strFailureUrl
, VARIANT
*pvarTargetFrame
)
194 ShellUIHelper
*This
= impl_from_IShellUIHelper2(iface
);
195 FIXME("(%p)->(%s %s %s)\n", This
, debugstr_w(strSearch
), debugstr_w(strFailureUrl
), debugstr_variant(pvarTargetFrame
));
199 static HRESULT WINAPI
ShellUIHelper2_AutoCompleteAttach(IShellUIHelper2
*iface
, VARIANT
*Reserved
)
201 ShellUIHelper
*This
= impl_from_IShellUIHelper2(iface
);
202 FIXME("(%p)->(%s)\n", This
, debugstr_variant(Reserved
));
206 static HRESULT WINAPI
ShellUIHelper2_ShowBrowserUI(IShellUIHelper2
*iface
, BSTR bstrName
, VARIANT
*pvarIn
, VARIANT
*pvarOut
)
208 ShellUIHelper
*This
= impl_from_IShellUIHelper2(iface
);
209 FIXME("(%p)->(%s %s %p)\n", This
, debugstr_w(bstrName
), debugstr_variant(pvarIn
), pvarOut
);
213 static HRESULT WINAPI
ShellUIHelper2_AddSearchProvider(IShellUIHelper2
*iface
, BSTR URL
)
215 ShellUIHelper
*This
= impl_from_IShellUIHelper2(iface
);
216 FIXME("(%p)->(%s)\n", This
, debugstr_w(URL
));
220 static HRESULT WINAPI
ShellUIHelper2_RunOnceShown(IShellUIHelper2
*iface
)
222 ShellUIHelper
*This
= impl_from_IShellUIHelper2(iface
);
223 FIXME("(%p)->()\n", This
);
227 static HRESULT WINAPI
ShellUIHelper2_SkipRunOnce(IShellUIHelper2
*iface
)
229 ShellUIHelper
*This
= impl_from_IShellUIHelper2(iface
);
230 FIXME("(%p)->()\n", This
);
234 static HRESULT WINAPI
ShellUIHelper2_CustomizeSettings(IShellUIHelper2
*iface
, VARIANT_BOOL fSQM
,
235 VARIANT_BOOL fPhishing
, BSTR bstrLocale
)
237 ShellUIHelper
*This
= impl_from_IShellUIHelper2(iface
);
238 FIXME("(%p)->(%x %x %s)\n", This
, fSQM
, fPhishing
, debugstr_w(bstrLocale
));
242 static HRESULT WINAPI
ShellUIHelper2_SqmEnabled(IShellUIHelper2
*iface
, VARIANT_BOOL
*pfEnabled
)
244 ShellUIHelper
*This
= impl_from_IShellUIHelper2(iface
);
245 FIXME("(%p)->(%p)\n", This
, pfEnabled
);
249 static HRESULT WINAPI
ShellUIHelper2_PhishingEnabled(IShellUIHelper2
*iface
, VARIANT_BOOL
*pfEnabled
)
251 ShellUIHelper
*This
= impl_from_IShellUIHelper2(iface
);
252 FIXME("(%p)->(%p)\n", This
, pfEnabled
);
256 static HRESULT WINAPI
ShellUIHelper2_BrandImageUri(IShellUIHelper2
*iface
, BSTR
*pbstrUri
)
258 ShellUIHelper
*This
= impl_from_IShellUIHelper2(iface
);
259 FIXME("(%p)->(%p)\n", This
, pbstrUri
);
263 static HRESULT WINAPI
ShellUIHelper2_SkipTabsWelcome(IShellUIHelper2
*iface
)
265 ShellUIHelper
*This
= impl_from_IShellUIHelper2(iface
);
266 FIXME("(%p)->()\n", This
);
270 static HRESULT WINAPI
ShellUIHelper2_DiagnoseConnection(IShellUIHelper2
*iface
)
272 ShellUIHelper
*This
= impl_from_IShellUIHelper2(iface
);
273 FIXME("(%p)->()\n", This
);
277 static HRESULT WINAPI
ShellUIHelper2_CustomizeClearType(IShellUIHelper2
*iface
, VARIANT_BOOL fSet
)
279 ShellUIHelper
*This
= impl_from_IShellUIHelper2(iface
);
280 FIXME("(%p)->(%x)\n", This
, fSet
);
284 static HRESULT WINAPI
ShellUIHelper2_IsSearchProviderInstalled(IShellUIHelper2
*iface
, BSTR URL
, DWORD
*pdwResult
)
286 ShellUIHelper
*This
= impl_from_IShellUIHelper2(iface
);
287 FIXME("(%p)->(%s %p)\n", This
, debugstr_w(URL
), pdwResult
);
291 static HRESULT WINAPI
ShellUIHelper2_IsSearchMigrated(IShellUIHelper2
*iface
, VARIANT_BOOL
*pfMigrated
)
293 ShellUIHelper
*This
= impl_from_IShellUIHelper2(iface
);
294 FIXME("(%p)->(%p)\n", This
, pfMigrated
);
298 static HRESULT WINAPI
ShellUIHelper2_DefaultSearchProvider(IShellUIHelper2
*iface
, BSTR
*pbstrName
)
300 ShellUIHelper
*This
= impl_from_IShellUIHelper2(iface
);
301 FIXME("(%p)->(%p)\n", This
, pbstrName
);
305 static HRESULT WINAPI
ShellUIHelper2_RunOnceRequiredSettingsComplete(IShellUIHelper2
*iface
, VARIANT_BOOL fComplete
)
307 ShellUIHelper
*This
= impl_from_IShellUIHelper2(iface
);
308 FIXME("(%p)->(%x)\n", This
, fComplete
);
312 static HRESULT WINAPI
ShellUIHelper2_RunOnceHasShown(IShellUIHelper2
*iface
, VARIANT_BOOL
*pfShown
)
314 ShellUIHelper
*This
= impl_from_IShellUIHelper2(iface
);
315 FIXME("(%p)->(%p)\n", This
, pfShown
);
319 static HRESULT WINAPI
ShellUIHelper2_SearchGuideUrl(IShellUIHelper2
*iface
, BSTR
*pbstrUrl
)
321 ShellUIHelper
*This
= impl_from_IShellUIHelper2(iface
);
322 FIXME("(%p)->(%p)\n", This
, pbstrUrl
);
326 static const IShellUIHelper2Vtbl ShellUIHelper2Vtbl
= {
327 ShellUIHelper2_QueryInterface
,
328 ShellUIHelper2_AddRef
,
329 ShellUIHelper2_Release
,
330 ShellUIHelper2_GetTypeInfoCount
,
331 ShellUIHelper2_GetTypeInfo
,
332 ShellUIHelper2_GetIDsOfNames
,
333 ShellUIHelper2_Invoke
,
334 ShellUIHelper2_ResetFirstBootMode
,
335 ShellUIHelper2_ResetSafeMode
,
336 ShellUIHelper2_RefreshOfflineDesktop
,
337 ShellUIHelper2_AddFavourite
,
338 ShellUIHelper2_AddChannel
,
339 ShellUIHelper2_AddDesktopComponent
,
340 ShellUIHelper2_IsSubscribed
,
341 ShellUIHelper2_NavigateAndFind
,
342 ShellUIHelper2_ImportExportFavourites
,
343 ShellUIHelper2_AutoCompleteSaveForm
,
344 ShellUIHelper2_AutoScan
,
345 ShellUIHelper2_AutoCompleteAttach
,
346 ShellUIHelper2_ShowBrowserUI
,
347 ShellUIHelper2_AddSearchProvider
,
348 ShellUIHelper2_RunOnceShown
,
349 ShellUIHelper2_SkipRunOnce
,
350 ShellUIHelper2_CustomizeSettings
,
351 ShellUIHelper2_SqmEnabled
,
352 ShellUIHelper2_PhishingEnabled
,
353 ShellUIHelper2_BrandImageUri
,
354 ShellUIHelper2_SkipTabsWelcome
,
355 ShellUIHelper2_DiagnoseConnection
,
356 ShellUIHelper2_CustomizeClearType
,
357 ShellUIHelper2_IsSearchProviderInstalled
,
358 ShellUIHelper2_IsSearchMigrated
,
359 ShellUIHelper2_DefaultSearchProvider
,
360 ShellUIHelper2_RunOnceRequiredSettingsComplete
,
361 ShellUIHelper2_RunOnceHasShown
,
362 ShellUIHelper2_SearchGuideUrl
365 HRESULT
create_shell_ui_helper(IShellUIHelper2
**_ret
)
369 ret
= heap_alloc(sizeof(*ret
));
371 return E_OUTOFMEMORY
;
373 ret
->IShellUIHelper2_iface
.lpVtbl
= &ShellUIHelper2Vtbl
;
376 *_ret
= &ret
->IShellUIHelper2_iface
;