wshom.ocx: Added IWshShortcut stub.
[wine/multimedia.git] / dlls / wshom.ocx / shell.c
blob949707d4f17551967643fbbd148b3c19f1c4c31c
1 /*
2 * Copyright 2011 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 "wshom_private.h"
20 #include "wshom.h"
22 #include "shlobj.h"
24 #include "wine/debug.h"
25 #include "wine/unicode.h"
27 WINE_DEFAULT_DEBUG_CHANNEL(wshom);
29 const char *debugstr_variant(const VARIANT *v)
31 if(!v)
32 return "(null)";
34 switch(V_VT(v)) {
35 case VT_EMPTY:
36 return "{VT_EMPTY}";
37 case VT_NULL:
38 return "{VT_NULL}";
39 case VT_I4:
40 return wine_dbg_sprintf("{VT_I4: %d}", V_I4(v));
41 case VT_R8:
42 return wine_dbg_sprintf("{VT_R8: %lf}", V_R8(v));
43 case VT_BSTR:
44 return wine_dbg_sprintf("{VT_BSTR: %s}", debugstr_w(V_BSTR(v)));
45 case VT_DISPATCH:
46 return wine_dbg_sprintf("{VT_DISPATCH: %p}", V_DISPATCH(v));
47 case VT_BOOL:
48 return wine_dbg_sprintf("{VT_BOOL: %x}", V_BOOL(v));
49 case VT_UNKNOWN:
50 return wine_dbg_sprintf("{VT_UNKNOWN: %p}", V_UNKNOWN(v));
51 case VT_UINT:
52 return wine_dbg_sprintf("{VT_UINT: %u}", V_UINT(v));
53 case VT_BSTR|VT_BYREF:
54 return wine_dbg_sprintf("{VT_BSTR|VT_BYREF: ptr %p, data %s}",
55 V_BSTRREF(v), debugstr_w(V_BSTRREF(v) ? *V_BSTRREF(v) : NULL));
56 default:
57 return wine_dbg_sprintf("{vt %d}", V_VT(v));
61 static IWshShell3 WshShell3;
63 typedef struct
65 IWshCollection IWshCollection_iface;
66 LONG ref;
67 } WshCollection;
69 typedef struct
71 IWshShortcut IWshShortcut_iface;
72 LONG ref;
73 } WshShortcut;
75 static inline WshCollection *impl_from_IWshCollection( IWshCollection *iface )
77 return CONTAINING_RECORD(iface, WshCollection, IWshCollection_iface);
80 static inline WshShortcut *impl_from_IWshShortcut( IWshShortcut *iface )
82 return CONTAINING_RECORD(iface, WshShortcut, IWshShortcut_iface);
85 static HRESULT WINAPI WshCollection_QueryInterface(IWshCollection *iface, REFIID riid, void **ppv)
87 WshCollection *This = impl_from_IWshCollection(iface);
89 TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppv);
91 if (IsEqualGUID(riid, &IID_IUnknown) ||
92 IsEqualGUID(riid, &IID_IDispatch) ||
93 IsEqualGUID(riid, &IID_IWshCollection))
95 *ppv = iface;
96 }else {
97 FIXME("Unknown iface %s\n", debugstr_guid(riid));
98 *ppv = NULL;
99 return E_NOINTERFACE;
102 IUnknown_AddRef((IUnknown*)*ppv);
103 return S_OK;
106 static ULONG WINAPI WshCollection_AddRef(IWshCollection *iface)
108 WshCollection *This = impl_from_IWshCollection(iface);
109 LONG ref = InterlockedIncrement(&This->ref);
110 TRACE("(%p) ref = %d\n", This, ref);
111 return ref;
114 static ULONG WINAPI WshCollection_Release(IWshCollection *iface)
116 WshCollection *This = impl_from_IWshCollection(iface);
117 LONG ref = InterlockedDecrement(&This->ref);
118 TRACE("(%p) ref = %d\n", This, ref);
120 if (!ref)
121 HeapFree(GetProcessHeap(), 0, This);
123 return ref;
126 static HRESULT WINAPI WshCollection_GetTypeInfoCount(IWshCollection *iface, UINT *pctinfo)
128 WshCollection *This = impl_from_IWshCollection(iface);
129 TRACE("(%p)->(%p)\n", This, pctinfo);
130 *pctinfo = 1;
131 return S_OK;
134 static HRESULT WINAPI WshCollection_GetTypeInfo(IWshCollection *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
136 WshCollection *This = impl_from_IWshCollection(iface);
137 TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
138 return get_typeinfo(IWshCollection_tid, ppTInfo);
141 static HRESULT WINAPI WshCollection_GetIDsOfNames(IWshCollection *iface, REFIID riid, LPOLESTR *rgszNames,
142 UINT cNames, LCID lcid, DISPID *rgDispId)
144 WshCollection *This = impl_from_IWshCollection(iface);
145 ITypeInfo *typeinfo;
146 HRESULT hr;
148 TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
150 hr = get_typeinfo(IWshCollection_tid, &typeinfo);
151 if(SUCCEEDED(hr))
153 hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId);
154 ITypeInfo_Release(typeinfo);
157 return hr;
160 static HRESULT WINAPI WshCollection_Invoke(IWshCollection *iface, DISPID dispIdMember, REFIID riid, LCID lcid,
161 WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
163 WshCollection *This = impl_from_IWshCollection(iface);
164 ITypeInfo *typeinfo;
165 HRESULT hr;
167 TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
168 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
170 hr = get_typeinfo(IWshCollection_tid, &typeinfo);
171 if(SUCCEEDED(hr))
173 hr = ITypeInfo_Invoke(typeinfo, &This->IWshCollection_iface, dispIdMember, wFlags,
174 pDispParams, pVarResult, pExcepInfo, puArgErr);
175 ITypeInfo_Release(typeinfo);
178 return hr;
181 static HRESULT WINAPI WshCollection_Item(IWshCollection *iface, VARIANT *index, VARIANT *value)
183 WshCollection *This = impl_from_IWshCollection(iface);
184 static const WCHAR allusersdesktopW[] = {'A','l','l','U','s','e','r','s','D','e','s','k','t','o','p',0};
185 static const WCHAR allusersprogramsW[] = {'A','l','l','U','s','e','r','s','P','r','o','g','r','a','m','s',0};
186 static const WCHAR desktopW[] = {'D','e','s','k','t','o','p',0};
187 PIDLIST_ABSOLUTE pidl;
188 WCHAR pathW[MAX_PATH];
189 int kind = 0;
190 BSTR folder;
191 HRESULT hr;
193 TRACE("(%p)->(%s %p)\n", This, debugstr_variant(index), value);
195 if (V_VT(index) != VT_BSTR)
197 FIXME("only BSTR index supported, got %d\n", V_VT(index));
198 return E_NOTIMPL;
201 folder = V_BSTR(index);
202 if (!strcmpiW(folder, desktopW))
203 kind = CSIDL_DESKTOP;
204 else if (!strcmpiW(folder, allusersdesktopW))
205 kind = CSIDL_COMMON_DESKTOPDIRECTORY;
206 else if (!strcmpiW(folder, allusersprogramsW))
207 kind = CSIDL_COMMON_PROGRAMS;
208 else
210 FIXME("folder kind %s not supported\n", debugstr_w(folder));
211 return E_NOTIMPL;
214 hr = SHGetSpecialFolderLocation(NULL, kind, &pidl);
215 if (hr != S_OK) return hr;
217 if (SHGetPathFromIDListW(pidl, pathW))
219 V_VT(value) = VT_BSTR;
220 V_BSTR(value) = SysAllocString(pathW);
221 hr = V_BSTR(value) ? S_OK : E_OUTOFMEMORY;
223 else
224 hr = E_FAIL;
226 CoTaskMemFree(pidl);
228 return hr;
231 static HRESULT WINAPI WshCollection_Count(IWshCollection *iface, LONG *count)
233 WshCollection *This = impl_from_IWshCollection(iface);
234 FIXME("(%p)->(%p): stub\n", This, count);
235 return E_NOTIMPL;
238 static HRESULT WINAPI WshCollection_get_length(IWshCollection *iface, LONG *count)
240 WshCollection *This = impl_from_IWshCollection(iface);
241 FIXME("(%p)->(%p): stub\n", This, count);
242 return E_NOTIMPL;
245 static HRESULT WINAPI WshCollection__NewEnum(IWshCollection *iface, IUnknown *Enum)
247 WshCollection *This = impl_from_IWshCollection(iface);
248 FIXME("(%p)->(%p): stub\n", This, Enum);
249 return E_NOTIMPL;
252 static const IWshCollectionVtbl WshCollectionVtbl = {
253 WshCollection_QueryInterface,
254 WshCollection_AddRef,
255 WshCollection_Release,
256 WshCollection_GetTypeInfoCount,
257 WshCollection_GetTypeInfo,
258 WshCollection_GetIDsOfNames,
259 WshCollection_Invoke,
260 WshCollection_Item,
261 WshCollection_Count,
262 WshCollection_get_length,
263 WshCollection__NewEnum
266 static HRESULT WshCollection_Create(IWshCollection **collection)
268 WshCollection *This;
270 This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
271 if (!This) return E_OUTOFMEMORY;
273 This->IWshCollection_iface.lpVtbl = &WshCollectionVtbl;
274 This->ref = 1;
276 *collection = &This->IWshCollection_iface;
278 return S_OK;
281 /* IWshShortcut */
282 static HRESULT WINAPI WshShortcut_QueryInterface(IWshShortcut *iface, REFIID riid, void **ppv)
284 WshShortcut *This = impl_from_IWshShortcut(iface);
286 TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppv);
288 if (IsEqualGUID(riid, &IID_IUnknown) ||
289 IsEqualGUID(riid, &IID_IDispatch) ||
290 IsEqualGUID(riid, &IID_IWshShortcut))
292 *ppv = iface;
293 }else {
294 FIXME("Unknown iface %s\n", debugstr_guid(riid));
295 *ppv = NULL;
296 return E_NOINTERFACE;
299 IUnknown_AddRef((IUnknown*)*ppv);
300 return S_OK;
303 static ULONG WINAPI WshShortcut_AddRef(IWshShortcut *iface)
305 WshShortcut *This = impl_from_IWshShortcut(iface);
306 LONG ref = InterlockedIncrement(&This->ref);
307 TRACE("(%p) ref = %d\n", This, ref);
308 return ref;
311 static ULONG WINAPI WshShortcut_Release(IWshShortcut *iface)
313 WshShortcut *This = impl_from_IWshShortcut(iface);
314 LONG ref = InterlockedDecrement(&This->ref);
315 TRACE("(%p) ref = %d\n", This, ref);
317 if (!ref)
318 HeapFree(GetProcessHeap(), 0, This);
320 return ref;
323 static HRESULT WINAPI WshShortcut_GetTypeInfoCount(IWshShortcut *iface, UINT *pctinfo)
325 WshShortcut *This = impl_from_IWshShortcut(iface);
326 TRACE("(%p)->(%p)\n", This, pctinfo);
327 *pctinfo = 1;
328 return S_OK;
331 static HRESULT WINAPI WshShortcut_GetTypeInfo(IWshShortcut *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
333 WshShortcut *This = impl_from_IWshShortcut(iface);
334 TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
335 return get_typeinfo(IWshShortcut_tid, ppTInfo);
338 static HRESULT WINAPI WshShortcut_GetIDsOfNames(IWshShortcut *iface, REFIID riid, LPOLESTR *rgszNames,
339 UINT cNames, LCID lcid, DISPID *rgDispId)
341 WshShortcut *This = impl_from_IWshShortcut(iface);
342 ITypeInfo *typeinfo;
343 HRESULT hr;
345 TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
347 hr = get_typeinfo(IWshShortcut_tid, &typeinfo);
348 if(SUCCEEDED(hr))
350 hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId);
351 ITypeInfo_Release(typeinfo);
354 return hr;
357 static HRESULT WINAPI WshShortcut_Invoke(IWshShortcut *iface, DISPID dispIdMember, REFIID riid, LCID lcid,
358 WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
360 WshShortcut *This = impl_from_IWshShortcut(iface);
361 ITypeInfo *typeinfo;
362 HRESULT hr;
364 TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
365 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
367 hr = get_typeinfo(IWshShortcut_tid, &typeinfo);
368 if(SUCCEEDED(hr))
370 hr = ITypeInfo_Invoke(typeinfo, &This->IWshShortcut_iface, dispIdMember, wFlags,
371 pDispParams, pVarResult, pExcepInfo, puArgErr);
372 ITypeInfo_Release(typeinfo);
375 return hr;
378 static HRESULT WINAPI WshShortcut_get_FullName(IWshShortcut *iface, BSTR *name)
380 WshShortcut *This = impl_from_IWshShortcut(iface);
381 FIXME("(%p)->(%p): stub\n", This, name);
382 return E_NOTIMPL;
385 static HRESULT WINAPI WshShortcut_get_Arguments(IWshShortcut *iface, BSTR *Arguments)
387 WshShortcut *This = impl_from_IWshShortcut(iface);
388 FIXME("(%p)->(%p): stub\n", This, Arguments);
389 return E_NOTIMPL;
392 static HRESULT WINAPI WshShortcut_put_Arguments(IWshShortcut *iface, BSTR Arguments)
394 WshShortcut *This = impl_from_IWshShortcut(iface);
395 FIXME("(%p)->(%s): stub\n", This, debugstr_w(Arguments));
396 return E_NOTIMPL;
399 static HRESULT WINAPI WshShortcut_get_Description(IWshShortcut *iface, BSTR *Description)
401 WshShortcut *This = impl_from_IWshShortcut(iface);
402 FIXME("(%p)->(%p): stub\n", This, Description);
403 return E_NOTIMPL;
406 static HRESULT WINAPI WshShortcut_put_Description(IWshShortcut *iface, BSTR Description)
408 WshShortcut *This = impl_from_IWshShortcut(iface);
409 FIXME("(%p)->(%s): stub\n", This, debugstr_w(Description));
410 return E_NOTIMPL;
413 static HRESULT WINAPI WshShortcut_get_Hotkey(IWshShortcut *iface, BSTR *Hotkey)
415 WshShortcut *This = impl_from_IWshShortcut(iface);
416 FIXME("(%p)->(%p): stub\n", This, Hotkey);
417 return E_NOTIMPL;
420 static HRESULT WINAPI WshShortcut_put_Hotkey(IWshShortcut *iface, BSTR Hotkey)
422 WshShortcut *This = impl_from_IWshShortcut(iface);
423 FIXME("(%p)->(%s): stub\n", This, debugstr_w(Hotkey));
424 return E_NOTIMPL;
427 static HRESULT WINAPI WshShortcut_get_IconLocation(IWshShortcut *iface, BSTR *IconPath)
429 WshShortcut *This = impl_from_IWshShortcut(iface);
430 FIXME("(%p)->(%p): stub\n", This, IconPath);
431 return E_NOTIMPL;
434 static HRESULT WINAPI WshShortcut_put_IconLocation(IWshShortcut *iface, BSTR IconPath)
436 WshShortcut *This = impl_from_IWshShortcut(iface);
437 FIXME("(%p)->(%s): stub\n", This, debugstr_w(IconPath));
438 return E_NOTIMPL;
441 static HRESULT WINAPI WshShortcut_put_RelativePath(IWshShortcut *iface, BSTR rhs)
443 WshShortcut *This = impl_from_IWshShortcut(iface);
444 FIXME("(%p)->(%s): stub\n", This, debugstr_w(rhs));
445 return E_NOTIMPL;
448 static HRESULT WINAPI WshShortcut_get_TargetPath(IWshShortcut *iface, BSTR *Path)
450 WshShortcut *This = impl_from_IWshShortcut(iface);
451 FIXME("(%p)->(%p): stub\n", This, Path);
452 return E_NOTIMPL;
455 static HRESULT WINAPI WshShortcut_put_TargetPath(IWshShortcut *iface, BSTR Path)
457 WshShortcut *This = impl_from_IWshShortcut(iface);
458 FIXME("(%p)->(%s): stub\n", This, debugstr_w(Path));
459 return E_NOTIMPL;
462 static HRESULT WINAPI WshShortcut_get_WindowStyle(IWshShortcut *iface, int *ShowCmd)
464 WshShortcut *This = impl_from_IWshShortcut(iface);
465 FIXME("(%p)->(%p): stub\n", This, ShowCmd);
466 return E_NOTIMPL;
469 static HRESULT WINAPI WshShortcut_put_WindowStyle(IWshShortcut *iface, int ShowCmd)
471 WshShortcut *This = impl_from_IWshShortcut(iface);
472 FIXME("(%p)->(%d): stub\n", This, ShowCmd);
473 return E_NOTIMPL;
476 static HRESULT WINAPI WshShortcut_get_WorkingDirectory(IWshShortcut *iface, BSTR *WorkingDirectory)
478 WshShortcut *This = impl_from_IWshShortcut(iface);
479 FIXME("(%p)->(%p): stub\n", This, WorkingDirectory);
480 return E_NOTIMPL;
483 static HRESULT WINAPI WshShortcut_put_WorkingDirectory(IWshShortcut *iface, BSTR WorkingDirectory)
485 WshShortcut *This = impl_from_IWshShortcut(iface);
486 FIXME("(%p)->(%s): stub\n", This, debugstr_w(WorkingDirectory));
487 return E_NOTIMPL;
490 static HRESULT WINAPI WshShortcut_Load(IWshShortcut *iface, BSTR PathLink)
492 WshShortcut *This = impl_from_IWshShortcut(iface);
493 FIXME("(%p)->(%s): stub\n", This, debugstr_w(PathLink));
494 return E_NOTIMPL;
497 static HRESULT WINAPI WshShortcut_Save(IWshShortcut *iface)
499 WshShortcut *This = impl_from_IWshShortcut(iface);
500 FIXME("(%p): stub\n", This);
501 return E_NOTIMPL;
504 static const IWshShortcutVtbl WshShortcutVtbl = {
505 WshShortcut_QueryInterface,
506 WshShortcut_AddRef,
507 WshShortcut_Release,
508 WshShortcut_GetTypeInfoCount,
509 WshShortcut_GetTypeInfo,
510 WshShortcut_GetIDsOfNames,
511 WshShortcut_Invoke,
512 WshShortcut_get_FullName,
513 WshShortcut_get_Arguments,
514 WshShortcut_put_Arguments,
515 WshShortcut_get_Description,
516 WshShortcut_put_Description,
517 WshShortcut_get_Hotkey,
518 WshShortcut_put_Hotkey,
519 WshShortcut_get_IconLocation,
520 WshShortcut_put_IconLocation,
521 WshShortcut_put_RelativePath,
522 WshShortcut_get_TargetPath,
523 WshShortcut_put_TargetPath,
524 WshShortcut_get_WindowStyle,
525 WshShortcut_put_WindowStyle,
526 WshShortcut_get_WorkingDirectory,
527 WshShortcut_put_WorkingDirectory,
528 WshShortcut_Load,
529 WshShortcut_Save
532 static HRESULT WshShortcut_Create(IDispatch **shortcut)
534 WshShortcut *This;
536 This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
537 if (!This) return E_OUTOFMEMORY;
539 This->IWshShortcut_iface.lpVtbl = &WshShortcutVtbl;
540 This->ref = 1;
542 *shortcut = (IDispatch*)&This->IWshShortcut_iface;
544 return S_OK;
547 static HRESULT WINAPI WshShell3_QueryInterface(IWshShell3 *iface, REFIID riid, void **ppv)
549 TRACE("(%s, %p)\n", debugstr_guid(riid), ppv);
551 if(IsEqualGUID(riid, &IID_IUnknown) ||
552 IsEqualGUID(riid, &IID_IDispatch) ||
553 IsEqualGUID(riid, &IID_IWshShell3))
555 *ppv = iface;
556 }else {
557 FIXME("Unknown iface %s\n", debugstr_guid(riid));
558 *ppv = NULL;
559 return E_NOINTERFACE;
562 IWshShell3_AddRef(iface);
563 return S_OK;
566 static ULONG WINAPI WshShell3_AddRef(IWshShell3 *iface)
568 TRACE("()\n");
569 return 2;
572 static ULONG WINAPI WshShell3_Release(IWshShell3 *iface)
574 TRACE("()\n");
575 return 2;
578 static HRESULT WINAPI WshShell3_GetTypeInfoCount(IWshShell3 *iface, UINT *pctinfo)
580 TRACE("(%p)\n", pctinfo);
581 *pctinfo = 1;
582 return S_OK;
585 static HRESULT WINAPI WshShell3_GetTypeInfo(IWshShell3 *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
587 TRACE("(%u %u %p)\n", iTInfo, lcid, ppTInfo);
588 return get_typeinfo(IWshShell3_tid, ppTInfo);
591 static HRESULT WINAPI WshShell3_GetIDsOfNames(IWshShell3 *iface, REFIID riid, LPOLESTR *rgszNames,
592 UINT cNames, LCID lcid, DISPID *rgDispId)
594 ITypeInfo *typeinfo;
595 HRESULT hr;
597 TRACE("(%s %p %u %u %p)\n", debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
599 hr = get_typeinfo(IWshShell3_tid, &typeinfo);
600 if(SUCCEEDED(hr))
602 hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId);
603 ITypeInfo_Release(typeinfo);
606 return hr;
609 static HRESULT WINAPI WshShell3_Invoke(IWshShell3 *iface, DISPID dispIdMember, REFIID riid, LCID lcid,
610 WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
612 ITypeInfo *typeinfo;
613 HRESULT hr;
615 TRACE("(%d %s %d %d %p %p %p %p)\n", dispIdMember, debugstr_guid(riid),
616 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
618 hr = get_typeinfo(IWshShell3_tid, &typeinfo);
619 if(SUCCEEDED(hr))
621 hr = ITypeInfo_Invoke(typeinfo, &WshShell3, dispIdMember, wFlags,
622 pDispParams, pVarResult, pExcepInfo, puArgErr);
623 ITypeInfo_Release(typeinfo);
626 return hr;
629 static HRESULT WINAPI WshShell3_get_SpecialFolders(IWshShell3 *iface, IWshCollection **folders)
631 TRACE("(%p)\n", folders);
632 return WshCollection_Create(folders);
635 static HRESULT WINAPI WshShell3_get_Environment(IWshShell3 *iface, VARIANT *Type, IWshEnvironment **out_Env)
637 FIXME("(%p %p): stub\n", Type, out_Env);
638 return E_NOTIMPL;
641 static HRESULT WINAPI WshShell3_Run(IWshShell3 *iface, BSTR Command, VARIANT *WindowStyle, VARIANT *WaitOnReturn, int *out_ExitCode)
643 FIXME("(%s %s %p): stub\n", debugstr_variant(WindowStyle), debugstr_variant(WaitOnReturn), out_ExitCode);
644 return E_NOTIMPL;
647 static HRESULT WINAPI WshShell3_Popup(IWshShell3 *iface, BSTR Text, VARIANT* SecondsToWait, VARIANT *Title, VARIANT *Type, int *button)
649 FIXME("(%s %s %s %s %p): stub\n", debugstr_w(Text), debugstr_variant(SecondsToWait),
650 debugstr_variant(Title), debugstr_variant(Type), button);
651 return E_NOTIMPL;
654 static HRESULT WINAPI WshShell3_CreateShortcut(IWshShell3 *iface, BSTR PathLink, IDispatch** Shortcut)
656 TRACE("(%s %p)\n", debugstr_w(PathLink), Shortcut);
657 return WshShortcut_Create(Shortcut);
660 static HRESULT WINAPI WshShell3_ExpandEnvironmentStrings(IWshShell3 *iface, BSTR Src, BSTR* out_Dst)
662 FIXME("(%s %p): stub\n", debugstr_w(Src), out_Dst);
663 return E_NOTIMPL;
666 static HRESULT WINAPI WshShell3_RegRead(IWshShell3 *iface, BSTR Name, VARIANT* out_Value)
668 FIXME("(%s %p): stub\n", debugstr_w(Name), out_Value);
669 return E_NOTIMPL;
672 static HRESULT WINAPI WshShell3_RegWrite(IWshShell3 *iface, BSTR Name, VARIANT *Value, VARIANT *Type)
674 FIXME("(%s %s %s): stub\n", debugstr_w(Name), debugstr_variant(Value), debugstr_variant(Type));
675 return E_NOTIMPL;
678 static HRESULT WINAPI WshShell3_RegDelete(IWshShell3 *iface, BSTR Name)
680 FIXME("(%s): stub\n", debugstr_w(Name));
681 return E_NOTIMPL;
684 static HRESULT WINAPI WshShell3_LogEvent(IWshShell3 *iface, VARIANT *Type, BSTR Message, BSTR Target, VARIANT_BOOL *out_Success)
686 FIXME("(%s %s %s %p): stub\n", debugstr_variant(Type), debugstr_w(Message), debugstr_w(Target), out_Success);
687 return E_NOTIMPL;
690 static HRESULT WINAPI WshShell3_AppActivate(IWshShell3 *iface, VARIANT *App, VARIANT *Wait, VARIANT_BOOL *out_Success)
692 FIXME("(%s %s %p): stub\n", debugstr_variant(App), debugstr_variant(Wait), out_Success);
693 return E_NOTIMPL;
696 static HRESULT WINAPI WshShell3_SendKeys(IWshShell3 *iface, BSTR Keys, VARIANT *Wait)
698 FIXME("(%s %p): stub\n", debugstr_w(Keys), Wait);
699 return E_NOTIMPL;
702 static const IWshShell3Vtbl WshShell3Vtbl = {
703 WshShell3_QueryInterface,
704 WshShell3_AddRef,
705 WshShell3_Release,
706 WshShell3_GetTypeInfoCount,
707 WshShell3_GetTypeInfo,
708 WshShell3_GetIDsOfNames,
709 WshShell3_Invoke,
710 WshShell3_get_SpecialFolders,
711 WshShell3_get_Environment,
712 WshShell3_Run,
713 WshShell3_Popup,
714 WshShell3_CreateShortcut,
715 WshShell3_ExpandEnvironmentStrings,
716 WshShell3_RegRead,
717 WshShell3_RegWrite,
718 WshShell3_RegDelete,
719 WshShell3_LogEvent,
720 WshShell3_AppActivate,
721 WshShell3_SendKeys
724 static IWshShell3 WshShell3 = { &WshShell3Vtbl };
726 HRESULT WINAPI WshShellFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
728 TRACE("(%p %s %p)\n", outer, debugstr_guid(riid), ppv);
730 return IWshShell3_QueryInterface(&WshShell3, riid, ppv);