ReactOS 0.4.15-dev-7834-g00c4b3d
shelluihelper.c
Go to the documentation of this file.
1/*
2 * Copyright 2012 Jacek Caban for CodeWeavers
3 *
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.
8 *
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.
13 *
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
17 */
18
19#include "ieframe.h"
20
21#include "wine/debug.h"
22
24
26 IShellUIHelper2 IShellUIHelper2_iface;
28};
29
30static inline ShellUIHelper *impl_from_IShellUIHelper2(IShellUIHelper2 *iface)
31{
32 return CONTAINING_RECORD(iface, ShellUIHelper, IShellUIHelper2_iface);
33}
34
35static HRESULT WINAPI ShellUIHelper2_QueryInterface(IShellUIHelper2 *iface, REFIID riid, void **ppv)
36{
38
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;
55 }
56
57 IUnknown_AddRef((IUnknown*)*ppv);
58 return S_OK;
59}
60
61static ULONG WINAPI ShellUIHelper2_AddRef(IShellUIHelper2 *iface)
62{
65
66 TRACE("(%p) ref=%d\n", This, ref);
67
68 return ref;
69}
70
71static ULONG WINAPI ShellUIHelper2_Release(IShellUIHelper2 *iface)
72{
75
76 TRACE("(%p) ref=%d\n", This, ref);
77
78 if(!ref)
80
81 return ref;
82}
83
84static HRESULT WINAPI ShellUIHelper2_GetTypeInfoCount(IShellUIHelper2 *iface, UINT *pctinfo)
85{
87
88 TRACE("(%p)->(%p)\n", This, pctinfo);
89
90 *pctinfo = 1;
91 return S_OK;
92}
93
94static HRESULT WINAPI ShellUIHelper2_GetTypeInfo(IShellUIHelper2 *iface, UINT iTInfo, LCID lcid, LPTYPEINFO *ppTInfo)
95{
97 FIXME("(%p)->(%d %d %p)\n", This, iTInfo, lcid, ppTInfo);
98 return E_NOTIMPL;
99}
100
101static HRESULT WINAPI ShellUIHelper2_GetIDsOfNames(IShellUIHelper2 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames,
102 LCID lcid, DISPID *rgDispId)
103{
105 unsigned i;
106
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]));
110
111 return DISP_E_UNKNOWNNAME;
112}
113
114static HRESULT WINAPI ShellUIHelper2_Invoke(IShellUIHelper2 *iface, DISPID dispIdMember,
115 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult,
116 EXCEPINFO *pExepInfo, UINT *puArgErr)
117{
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;
122}
123
125{
127 FIXME("(%p)->()\n", This);
128 return E_NOTIMPL;
129}
130
131static HRESULT WINAPI ShellUIHelper2_ResetSafeMode(IShellUIHelper2 *iface)
132{
134 FIXME("(%p)->()\n", This);
135 return E_NOTIMPL;
136}
137
139{
141 FIXME("(%p)->()\n", This);
142 return E_NOTIMPL;
143}
144
145static HRESULT WINAPI ShellUIHelper2_AddFavourite(IShellUIHelper2 *iface, BSTR URL, VARIANT *Title)
146{
148 FIXME("(%p)->(%s %s)\n", This, debugstr_w(URL), debugstr_variant(Title));
149 return E_NOTIMPL;
150}
151
152static HRESULT WINAPI ShellUIHelper2_AddChannel(IShellUIHelper2 *iface, BSTR URL)
153{
155 FIXME("(%p)->(%s)\n", This, debugstr_w(URL));
156 return E_NOTIMPL;
157}
158
159static HRESULT WINAPI ShellUIHelper2_AddDesktopComponent(IShellUIHelper2 *iface, BSTR URL, BSTR Type,
161{
163 FIXME("(%p)->(%s %s %s %s %s %s)\n", This, debugstr_w(URL), debugstr_w(Type), debugstr_variant(Left),
165 return E_NOTIMPL;
166}
167
168static HRESULT WINAPI ShellUIHelper2_IsSubscribed(IShellUIHelper2 *iface, BSTR URL, VARIANT_BOOL *pBool)
169{
171 FIXME("(%p)->(%s %p)\n", This, debugstr_w(URL), pBool);
172 return E_NOTIMPL;
173}
174
175static HRESULT WINAPI ShellUIHelper2_NavigateAndFind(IShellUIHelper2 *iface, BSTR URL, BSTR strQuery, VARIANT *varTargetFrame)
176{
178 FIXME("(%p)->(%s %s %s)\n", This, debugstr_w(URL), debugstr_w(strQuery), debugstr_variant(varTargetFrame));
179 return E_NOTIMPL;
180}
181
182static HRESULT WINAPI ShellUIHelper2_ImportExportFavourites(IShellUIHelper2 *iface, VARIANT_BOOL fImport, BSTR strImpExpPath)
183{
185 FIXME("(%p)->(%x %s)\n", This, fImport, debugstr_w(strImpExpPath));
186 return E_NOTIMPL;
187}
188
189static HRESULT WINAPI ShellUIHelper2_AutoCompleteSaveForm(IShellUIHelper2 *iface, VARIANT *Form)
190{
192 FIXME("(%p)->(%s)\n", This, debugstr_variant(Form));
193 return E_NOTIMPL;
194}
195
196static HRESULT WINAPI ShellUIHelper2_AutoScan(IShellUIHelper2 *iface, BSTR strSearch, BSTR strFailureUrl, VARIANT *pvarTargetFrame)
197{
199 FIXME("(%p)->(%s %s %s)\n", This, debugstr_w(strSearch), debugstr_w(strFailureUrl), debugstr_variant(pvarTargetFrame));
200 return E_NOTIMPL;
201}
202
204{
206 FIXME("(%p)->(%s)\n", This, debugstr_variant(Reserved));
207 return E_NOTIMPL;
208}
209
210static HRESULT WINAPI ShellUIHelper2_ShowBrowserUI(IShellUIHelper2 *iface, BSTR bstrName, VARIANT *pvarIn, VARIANT *pvarOut)
211{
213 FIXME("(%p)->(%s %s %p)\n", This, debugstr_w(bstrName), debugstr_variant(pvarIn), pvarOut);
214 return E_NOTIMPL;
215}
216
217static HRESULT WINAPI ShellUIHelper2_AddSearchProvider(IShellUIHelper2 *iface, BSTR URL)
218{
220 FIXME("(%p)->(%s)\n", This, debugstr_w(URL));
221 return E_NOTIMPL;
222}
223
224static HRESULT WINAPI ShellUIHelper2_RunOnceShown(IShellUIHelper2 *iface)
225{
227 FIXME("(%p)->()\n", This);
228 return E_NOTIMPL;
229}
230
231static HRESULT WINAPI ShellUIHelper2_SkipRunOnce(IShellUIHelper2 *iface)
232{
234 FIXME("(%p)->()\n", This);
235 return E_NOTIMPL;
236}
237
239 VARIANT_BOOL fPhishing, BSTR bstrLocale)
240{
242 FIXME("(%p)->(%x %x %s)\n", This, fSQM, fPhishing, debugstr_w(bstrLocale));
243 return E_NOTIMPL;
244}
245
246static HRESULT WINAPI ShellUIHelper2_SqmEnabled(IShellUIHelper2 *iface, VARIANT_BOOL *pfEnabled)
247{
249 FIXME("(%p)->(%p)\n", This, pfEnabled);
250 return E_NOTIMPL;
251}
252
253static HRESULT WINAPI ShellUIHelper2_PhishingEnabled(IShellUIHelper2 *iface, VARIANT_BOOL *pfEnabled)
254{
256 FIXME("(%p)->(%p)\n", This, pfEnabled);
257 return E_NOTIMPL;
258}
259
260static HRESULT WINAPI ShellUIHelper2_BrandImageUri(IShellUIHelper2 *iface, BSTR *pbstrUri)
261{
263 FIXME("(%p)->(%p)\n", This, pbstrUri);
264 return E_NOTIMPL;
265}
266
267static HRESULT WINAPI ShellUIHelper2_SkipTabsWelcome(IShellUIHelper2 *iface)
268{
270 FIXME("(%p)->()\n", This);
271 return E_NOTIMPL;
272}
273
275{
277 FIXME("(%p)->()\n", This);
278 return E_NOTIMPL;
279}
280
282{
284 FIXME("(%p)->(%x)\n", This, fSet);
285 return E_NOTIMPL;
286}
287
289{
291 FIXME("(%p)->(%s %p)\n", This, debugstr_w(URL), pdwResult);
292 return E_NOTIMPL;
293}
294
295static HRESULT WINAPI ShellUIHelper2_IsSearchMigrated(IShellUIHelper2 *iface, VARIANT_BOOL *pfMigrated)
296{
298 FIXME("(%p)->(%p)\n", This, pfMigrated);
299 return E_NOTIMPL;
300}
301
302static HRESULT WINAPI ShellUIHelper2_DefaultSearchProvider(IShellUIHelper2 *iface, BSTR *pbstrName)
303{
305 FIXME("(%p)->(%p)\n", This, pbstrName);
306 return E_NOTIMPL;
307}
308
310{
312 FIXME("(%p)->(%x)\n", This, fComplete);
313 return E_NOTIMPL;
314}
315
316static HRESULT WINAPI ShellUIHelper2_RunOnceHasShown(IShellUIHelper2 *iface, VARIANT_BOOL *pfShown)
317{
319 FIXME("(%p)->(%p)\n", This, pfShown);
320 return E_NOTIMPL;
321}
322
323static HRESULT WINAPI ShellUIHelper2_SearchGuideUrl(IShellUIHelper2 *iface, BSTR *pbstrUrl)
324{
326 FIXME("(%p)->(%p)\n", This, pbstrUrl);
327 return E_NOTIMPL;
328}
329
330static const IShellUIHelper2Vtbl ShellUIHelper2Vtbl = {
367};
368
369HRESULT create_shell_ui_helper(IShellUIHelper2 **_ret)
370{
372
373 ret = heap_alloc(sizeof(*ret));
374 if(!ret)
375 return E_OUTOFMEMORY;
376
377 ret->IShellUIHelper2_iface.lpVtbl = &ShellUIHelper2Vtbl;
378 ret->ref = 1;
379
380 *_ret = &ret->IShellUIHelper2_iface;
381 return S_OK;
382}
Type
Definition: Type.h:7
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
static LPHIST_ENTRY Top
Definition: history.c:53
const GUID IID_IUnknown
#define FIXME(fmt,...)
Definition: debug.h:111
#define WARN(fmt,...)
Definition: debug.h:112
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_NOTIMPL
Definition: ddrawi.h:99
#define NULL
Definition: types.h:112
static const WCHAR Title[]
Definition: oid.c:1259
OLECHAR * BSTR
Definition: compat.h:2293
short VARIANT_BOOL
Definition: compat.h:2290
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_w
Definition: kernel32.h:32
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
static LPOLESTR
Definition: stg_prop.c:27
static VARIANTARG static DISPID
Definition: ordinal.c:52
unsigned int UINT
Definition: ndis.h:50
_In_ UINT _In_ DWORD _Out_ DWORD * pdwResult
Definition: ntgdi.h:250
const GUID IID_IDispatch
long LONG
Definition: pedump.c:60
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
DWORD LCID
Definition: nls.h:13
static HRESULT WINAPI ShellUIHelper2_SkipTabsWelcome(IShellUIHelper2 *iface)
static HRESULT WINAPI ShellUIHelper2_GetTypeInfoCount(IShellUIHelper2 *iface, UINT *pctinfo)
Definition: shelluihelper.c:84
HRESULT create_shell_ui_helper(IShellUIHelper2 **_ret)
static HRESULT WINAPI ShellUIHelper2_RefreshOfflineDesktop(IShellUIHelper2 *iface)
static HRESULT WINAPI ShellUIHelper2_IsSearchProviderInstalled(IShellUIHelper2 *iface, BSTR URL, DWORD *pdwResult)
static HRESULT WINAPI ShellUIHelper2_IsSearchMigrated(IShellUIHelper2 *iface, VARIANT_BOOL *pfMigrated)
static HRESULT WINAPI ShellUIHelper2_AddDesktopComponent(IShellUIHelper2 *iface, BSTR URL, BSTR Type, VARIANT *Left, VARIANT *Top, VARIANT *Width, VARIANT *Height)
static HRESULT WINAPI ShellUIHelper2_AddChannel(IShellUIHelper2 *iface, BSTR URL)
static HRESULT WINAPI ShellUIHelper2_GetTypeInfo(IShellUIHelper2 *iface, UINT iTInfo, LCID lcid, LPTYPEINFO *ppTInfo)
Definition: shelluihelper.c:94
static HRESULT WINAPI ShellUIHelper2_CustomizeClearType(IShellUIHelper2 *iface, VARIANT_BOOL fSet)
static ULONG WINAPI ShellUIHelper2_AddRef(IShellUIHelper2 *iface)
Definition: shelluihelper.c:61
static HRESULT WINAPI ShellUIHelper2_SearchGuideUrl(IShellUIHelper2 *iface, BSTR *pbstrUrl)
static HRESULT WINAPI ShellUIHelper2_IsSubscribed(IShellUIHelper2 *iface, BSTR URL, VARIANT_BOOL *pBool)
static ULONG WINAPI ShellUIHelper2_Release(IShellUIHelper2 *iface)
Definition: shelluihelper.c:71
static ShellUIHelper * impl_from_IShellUIHelper2(IShellUIHelper2 *iface)
Definition: shelluihelper.c:30
static HRESULT WINAPI ShellUIHelper2_ShowBrowserUI(IShellUIHelper2 *iface, BSTR bstrName, VARIANT *pvarIn, VARIANT *pvarOut)
static HRESULT WINAPI ShellUIHelper2_AutoCompleteAttach(IShellUIHelper2 *iface, VARIANT *Reserved)
static HRESULT WINAPI ShellUIHelper2_Invoke(IShellUIHelper2 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExepInfo, UINT *puArgErr)
static HRESULT WINAPI ShellUIHelper2_CustomizeSettings(IShellUIHelper2 *iface, VARIANT_BOOL fSQM, VARIANT_BOOL fPhishing, BSTR bstrLocale)
static HRESULT WINAPI ShellUIHelper2_RunOnceRequiredSettingsComplete(IShellUIHelper2 *iface, VARIANT_BOOL fComplete)
static HRESULT WINAPI ShellUIHelper2_NavigateAndFind(IShellUIHelper2 *iface, BSTR URL, BSTR strQuery, VARIANT *varTargetFrame)
static HRESULT WINAPI ShellUIHelper2_RunOnceShown(IShellUIHelper2 *iface)
static HRESULT WINAPI ShellUIHelper2_DiagnoseConnection(IShellUIHelper2 *iface)
static HRESULT WINAPI ShellUIHelper2_PhishingEnabled(IShellUIHelper2 *iface, VARIANT_BOOL *pfEnabled)
static HRESULT WINAPI ShellUIHelper2_ImportExportFavourites(IShellUIHelper2 *iface, VARIANT_BOOL fImport, BSTR strImpExpPath)
static HRESULT WINAPI ShellUIHelper2_BrandImageUri(IShellUIHelper2 *iface, BSTR *pbstrUri)
static HRESULT WINAPI ShellUIHelper2_QueryInterface(IShellUIHelper2 *iface, REFIID riid, void **ppv)
Definition: shelluihelper.c:35
static HRESULT WINAPI ShellUIHelper2_AutoCompleteSaveForm(IShellUIHelper2 *iface, VARIANT *Form)
static HRESULT WINAPI ShellUIHelper2_SqmEnabled(IShellUIHelper2 *iface, VARIANT_BOOL *pfEnabled)
static HRESULT WINAPI ShellUIHelper2_SkipRunOnce(IShellUIHelper2 *iface)
static HRESULT WINAPI ShellUIHelper2_RunOnceHasShown(IShellUIHelper2 *iface, VARIANT_BOOL *pfShown)
static HRESULT WINAPI ShellUIHelper2_AddSearchProvider(IShellUIHelper2 *iface, BSTR URL)
static HRESULT WINAPI ShellUIHelper2_ResetSafeMode(IShellUIHelper2 *iface)
static HRESULT WINAPI ShellUIHelper2_GetIDsOfNames(IShellUIHelper2 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
static HRESULT WINAPI ShellUIHelper2_AutoScan(IShellUIHelper2 *iface, BSTR strSearch, BSTR strFailureUrl, VARIANT *pvarTargetFrame)
static HRESULT WINAPI ShellUIHelper2_DefaultSearchProvider(IShellUIHelper2 *iface, BSTR *pbstrName)
static const IShellUIHelper2Vtbl ShellUIHelper2Vtbl
static HRESULT WINAPI ShellUIHelper2_AddFavourite(IShellUIHelper2 *iface, BSTR URL, VARIANT *Title)
static HRESULT WINAPI ShellUIHelper2_ResetFirstBootMode(IShellUIHelper2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
IShellUIHelper2 IShellUIHelper2_iface
Definition: shelluihelper.c:26
Definition: send.c:48
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
Definition: font.h:89
_In_ HFONT _Out_ PUINT Height
Definition: font.h:88
int ret
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
#define WINAPI
Definition: msvc.h:6
#define E_NOINTERFACE
Definition: winerror.h:2364
#define DISP_E_UNKNOWNNAME
Definition: winerror.h:2515