2 * IShellDispatch implementation
4 * Copyright 2010 Alexander Morozov for Etersoft
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #include "wine/port.h"
27 #define NONAMELESSUNION
28 #define NONAMELESSSTRUCT
38 #include "wine/debug.h"
40 WINE_DEFAULT_DEBUG_CHANNEL(shell);
43 IShellDispatch2 IShellDispatch2_iface;
56 FolderItem FolderItem_iface;
62 static inline ShellDispatch *impl_from_IShellDispatch2(IShellDispatch2 *iface)
64 return CONTAINING_RECORD(iface, ShellDispatch, IShellDispatch2_iface);
67 static inline FolderImpl *impl_from_Folder(Folder3 *iface)
69 return CONTAINING_RECORD(iface, FolderImpl, Folder_iface);
72 static inline FolderItemImpl *impl_from_FolderItem(FolderItem *iface)
74 return CONTAINING_RECORD(iface, FolderItemImpl, FolderItem_iface);
77 static HRESULT load_type_info(REFGUID guid, ITypeInfo **pptinfo)
82 ret = LoadRegTypeLib(&LIBID_Shell32, 1, 0, LOCALE_SYSTEM_DEFAULT, &typelib);
85 ERR("LoadRegTypeLib failed: %08x\n", ret);
89 ret = ITypeLib_GetTypeInfoOfGuid(typelib, guid, pptinfo);
90 ITypeLib_Release(typelib);
92 ERR("failed to load ITypeInfo\n");
97 static HRESULT WINAPI FolderItemImpl_QueryInterface(FolderItem *iface,
98 REFIID riid, LPVOID *ppv)
100 FolderItemImpl *This = impl_from_FolderItem(iface);
102 TRACE("(%p,%p,%p)\n", iface, riid, ppv);
104 if (!ppv) return E_INVALIDARG;
106 if (IsEqualIID(&IID_IUnknown, riid) ||
107 IsEqualIID(&IID_IDispatch, riid) ||
108 IsEqualIID(&IID_FolderItem, riid))
112 FIXME("not implemented for %s\n", shdebugstr_guid(riid));
114 return E_NOINTERFACE;
116 IUnknown_AddRef((IUnknown*)*ppv);
120 static ULONG WINAPI FolderItemImpl_AddRef(FolderItem *iface)
122 FolderItemImpl *This = impl_from_FolderItem(iface);
123 ULONG ref = InterlockedIncrement(&This->ref);
125 TRACE("(%p), new refcount=%i\n", iface, ref);
130 static ULONG WINAPI FolderItemImpl_Release(FolderItem *iface)
132 FolderItemImpl *This = impl_from_FolderItem(iface);
133 ULONG ref = InterlockedDecrement(&This->ref);
135 TRACE("(%p), new refcount=%i\n", iface, ref);
139 VariantClear(&This->dir);
140 ITypeInfo_Release(This->iTypeInfo);
141 HeapFree(GetProcessHeap(), 0, This);
146 static HRESULT WINAPI FolderItemImpl_GetTypeInfoCount(FolderItem *iface,
149 TRACE("(%p,%p)\n", iface, pctinfo);
155 static HRESULT WINAPI FolderItemImpl_GetTypeInfo(FolderItem *iface, UINT iTInfo,
156 LCID lcid, ITypeInfo **ppTInfo)
158 FolderItemImpl *This = impl_from_FolderItem(iface);
160 TRACE("(%p,%u,%d,%p)\n", iface, iTInfo, lcid, ppTInfo);
162 ITypeInfo_AddRef(This->iTypeInfo);
163 *ppTInfo = This->iTypeInfo;
167 static HRESULT WINAPI FolderItemImpl_GetIDsOfNames(FolderItem *iface,
168 REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid,
171 FolderItemImpl *This = impl_from_FolderItem(iface);
173 TRACE("(%p,%p,%p,%u,%d,%p)\n", iface, riid, rgszNames, cNames, lcid,
176 return ITypeInfo_GetIDsOfNames(This->iTypeInfo, rgszNames, cNames, rgDispId);
179 static HRESULT WINAPI FolderItemImpl_Invoke(FolderItem *iface,
180 DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags,
181 DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo,
184 FolderItemImpl *This = impl_from_FolderItem(iface);
186 TRACE("(%p,%d,%p,%d,%u,%p,%p,%p,%p)\n", iface, dispIdMember, riid, lcid,
187 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
189 return ITypeInfo_Invoke(This->iTypeInfo, This, dispIdMember, wFlags,
190 pDispParams, pVarResult, pExcepInfo, puArgErr);
193 static HRESULT WINAPI FolderItemImpl_get_Application(FolderItem *iface,
196 FIXME("(%p,%p)\n", iface, ppid);
202 static HRESULT WINAPI FolderItemImpl_get_Parent(FolderItem *iface,
205 FIXME("(%p,%p)\n", iface, ppid);
211 static HRESULT WINAPI FolderItemImpl_get_Name(FolderItem *iface, BSTR *pbs)
213 FIXME("(%p,%p)\n", iface, pbs);
219 static HRESULT WINAPI FolderItemImpl_put_Name(FolderItem *iface, BSTR bs)
221 FIXME("(%p,%s)\n", iface, debugstr_w(bs));
226 static HRESULT WINAPI FolderItemImpl_get_Path(FolderItem *iface, BSTR *pbs)
228 FolderItemImpl *This = impl_from_FolderItem(iface);
233 TRACE("(%p,%p)\n", iface, pbs);
236 if (V_VT(&This->dir) == VT_I4)
238 pathW = HeapAlloc(GetProcessHeap(), 0, MAX_PATH * sizeof(WCHAR));
239 if (!pathW) return E_OUTOFMEMORY;
240 ret = SHGetFolderPathW(NULL, V_I4(&This->dir), NULL, SHGFP_TYPE_CURRENT,
243 *pbs = SysAllocString(pathW);
244 else if (ret == E_INVALIDARG)
246 FIXME("not implemented for %#x\n", V_I4(&This->dir));
249 HeapFree(GetProcessHeap(), 0, pathW);
253 pathW = V_BSTR(&This->dir);
254 len = lstrlenW(pathW);
255 *pbs = SysAllocStringLen(pathW, pathW[len - 1] == '\\' ? len - 1 : len);
257 if (ret == S_OK && !*pbs)
262 static HRESULT WINAPI FolderItemImpl_get_GetLink(FolderItem *iface,
265 FIXME("(%p,%p)\n", iface, ppid);
271 static HRESULT WINAPI FolderItemImpl_get_GetFolder(FolderItem *iface,
274 FIXME("(%p,%p)\n", iface, ppid);
280 static HRESULT WINAPI FolderItemImpl_get_IsLink(FolderItem *iface,
283 FIXME("(%p,%p)\n", iface, pb);
288 static HRESULT WINAPI FolderItemImpl_get_IsFolder(FolderItem *iface,
291 FIXME("(%p,%p)\n", iface, pb);
296 static HRESULT WINAPI FolderItemImpl_get_IsFileSystem(FolderItem *iface,
299 FIXME("(%p,%p)\n", iface, pb);
304 static HRESULT WINAPI FolderItemImpl_get_IsBrowsable(FolderItem *iface,
307 FIXME("(%p,%p)\n", iface, pb);
312 static HRESULT WINAPI FolderItemImpl_get_ModifyDate(FolderItem *iface,
315 FIXME("(%p,%p)\n", iface, pdt);
320 static HRESULT WINAPI FolderItemImpl_put_ModifyDate(FolderItem *iface, DATE dt)
322 FIXME("(%p,%f)\n", iface, dt);
327 static HRESULT WINAPI FolderItemImpl_get_Size(FolderItem *iface, LONG *pul)
329 FIXME("(%p,%p)\n", iface, pul);
334 static HRESULT WINAPI FolderItemImpl_get_Type(FolderItem *iface, BSTR *pbs)
336 FIXME("(%p,%p)\n", iface, pbs);
342 static HRESULT WINAPI FolderItemImpl_Verbs(FolderItem *iface,
343 FolderItemVerbs **ppfic)
345 FIXME("(%p,%p)\n", iface, ppfic);
351 static HRESULT WINAPI FolderItemImpl_InvokeVerb(FolderItem *iface,
354 FIXME("(%p)\n", iface);
359 static const FolderItemVtbl FolderItemImpl_Vtbl = {
360 FolderItemImpl_QueryInterface,
361 FolderItemImpl_AddRef,
362 FolderItemImpl_Release,
363 FolderItemImpl_GetTypeInfoCount,
364 FolderItemImpl_GetTypeInfo,
365 FolderItemImpl_GetIDsOfNames,
366 FolderItemImpl_Invoke,
367 FolderItemImpl_get_Application,
368 FolderItemImpl_get_Parent,
369 FolderItemImpl_get_Name,
370 FolderItemImpl_put_Name,
371 FolderItemImpl_get_Path,
372 FolderItemImpl_get_GetLink,
373 FolderItemImpl_get_GetFolder,
374 FolderItemImpl_get_IsLink,
375 FolderItemImpl_get_IsFolder,
376 FolderItemImpl_get_IsFileSystem,
377 FolderItemImpl_get_IsBrowsable,
378 FolderItemImpl_get_ModifyDate,
379 FolderItemImpl_put_ModifyDate,
380 FolderItemImpl_get_Size,
381 FolderItemImpl_get_Type,
382 FolderItemImpl_Verbs,
383 FolderItemImpl_InvokeVerb
386 static HRESULT FolderItem_Constructor(VARIANT *dir, FolderItem **ppfi)
388 FolderItemImpl *This;
393 This = HeapAlloc(GetProcessHeap(), 0, sizeof(FolderItemImpl));
394 if (!This) return E_OUTOFMEMORY;
395 This->FolderItem_iface.lpVtbl = &FolderItemImpl_Vtbl;
398 ret = load_type_info(&IID_FolderItem, &This->iTypeInfo);
401 HeapFree(GetProcessHeap(), 0, This);
405 VariantInit(&This->dir);
406 ret = VariantCopy(&This->dir, dir);
409 ITypeInfo_Release(This->iTypeInfo);
410 HeapFree(GetProcessHeap(), 0, This);
411 return E_OUTOFMEMORY;
414 *ppfi = (FolderItem*)This;
418 static HRESULT WINAPI FolderImpl_QueryInterface(Folder3 *iface, REFIID riid,
421 FolderImpl *This = impl_from_Folder(iface);
423 TRACE("(%p,%p,%p)\n", iface, riid, ppv);
425 if (!ppv) return E_INVALIDARG;
427 if (IsEqualIID(&IID_IUnknown, riid) ||
428 IsEqualIID(&IID_IDispatch, riid) ||
429 IsEqualIID(&IID_Folder, riid) ||
430 IsEqualIID(&IID_Folder2, riid) ||
431 IsEqualIID(&IID_Folder3, riid))
435 FIXME("not implemented for %s\n", shdebugstr_guid(riid));
437 return E_NOINTERFACE;
439 IUnknown_AddRef((IUnknown*)*ppv);
443 static ULONG WINAPI FolderImpl_AddRef(Folder3 *iface)
445 FolderImpl *This = impl_from_Folder(iface);
446 ULONG ref = InterlockedIncrement(&This->ref);
448 TRACE("(%p), new refcount=%i\n", iface, ref);
453 static ULONG WINAPI FolderImpl_Release(Folder3 *iface)
455 FolderImpl *This = impl_from_Folder(iface);
456 ULONG ref = InterlockedDecrement(&This->ref);
458 TRACE("(%p), new refcount=%i\n", iface, ref);
462 VariantClear(&This->dir);
463 ITypeInfo_Release(This->iTypeInfo);
464 HeapFree(GetProcessHeap(), 0, This);
469 static HRESULT WINAPI FolderImpl_GetTypeInfoCount(Folder3 *iface, UINT *pctinfo)
471 TRACE("(%p,%p)\n", iface, pctinfo);
477 static HRESULT WINAPI FolderImpl_GetTypeInfo(Folder3 *iface, UINT iTInfo,
478 LCID lcid, ITypeInfo **ppTInfo)
480 FolderImpl *This = impl_from_Folder(iface);
482 TRACE("(%p,%u,%d,%p)\n", iface, iTInfo, lcid, ppTInfo);
484 ITypeInfo_AddRef(This->iTypeInfo);
485 *ppTInfo = This->iTypeInfo;
489 static HRESULT WINAPI FolderImpl_GetIDsOfNames(Folder3 *iface, REFIID riid,
490 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
492 FolderImpl *This = impl_from_Folder(iface);
494 TRACE("(%p,%p,%p,%u,%d,%p)\n", iface, riid, rgszNames, cNames, lcid,
497 return ITypeInfo_GetIDsOfNames(This->iTypeInfo, rgszNames, cNames,
501 static HRESULT WINAPI FolderImpl_Invoke(Folder3 *iface, DISPID dispIdMember,
502 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
503 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
505 FolderImpl *This = impl_from_Folder(iface);
507 TRACE("(%p,%d,%p,%d,%u,%p,%p,%p,%p)\n", iface, dispIdMember, riid, lcid,
508 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
510 return ITypeInfo_Invoke(This->iTypeInfo, This, dispIdMember, wFlags,
511 pDispParams, pVarResult, pExcepInfo, puArgErr);
514 static HRESULT WINAPI FolderImpl_get_Title(Folder3 *iface, BSTR *pbs)
516 FolderImpl *This = impl_from_Folder(iface);
520 TRACE("(%p,%p)\n", iface, pbs);
524 if (V_VT(&This->dir) == VT_I4)
526 FIXME("special folder constants are not supported\n");
529 p = PathFindFileNameW(V_BSTR(&This->dir));
531 *pbs = SysAllocStringLen(p, p[len - 1] == '\\' ? len - 1 : len);
532 return *pbs ? S_OK : E_OUTOFMEMORY;
535 static HRESULT WINAPI FolderImpl_get_Application(Folder3 *iface,
538 FIXME("(%p,%p)\n", iface, ppid);
544 static HRESULT WINAPI FolderImpl_get_Parent(Folder3 *iface, IDispatch **ppid)
546 FIXME("(%p,%p)\n", iface, ppid);
552 static HRESULT WINAPI FolderImpl_get_ParentFolder(Folder3 *iface, Folder **ppsf)
554 FIXME("(%p,%p)\n", iface, ppsf);
560 static HRESULT WINAPI FolderImpl_Items(Folder3 *iface, FolderItems **ppid)
562 FIXME("(%p,%p)\n", iface, ppid);
568 static HRESULT WINAPI FolderImpl_ParseName(Folder3 *iface, BSTR bName,
571 FIXME("(%p,%s,%p)\n", iface, debugstr_w(bName), ppid);
577 static HRESULT WINAPI FolderImpl_NewFolder(Folder3 *iface, BSTR bName,
580 FIXME("(%p,%s)\n", iface, debugstr_w(bName));
585 static HRESULT WINAPI FolderImpl_MoveHere(Folder3 *iface, VARIANT vItem,
588 FIXME("(%p)\n", iface);
593 static HRESULT WINAPI FolderImpl_CopyHere(Folder3 *iface, VARIANT vItem,
596 FIXME("(%p)\n", iface);
601 static HRESULT WINAPI FolderImpl_GetDetailsOf(Folder3 *iface, VARIANT vItem,
602 int iColumn, BSTR *pbs)
604 FIXME("(%p,%d,%p)\n", iface, iColumn, pbs);
610 static HRESULT WINAPI FolderImpl_get_Self(Folder3 *iface, FolderItem **ppfi)
612 FolderImpl *This = impl_from_Folder(iface);
614 TRACE("(%p,%p)\n", iface, ppfi);
616 return FolderItem_Constructor(&This->dir, ppfi);
619 static HRESULT WINAPI FolderImpl_get_OfflineStatus(Folder3 *iface, LONG *pul)
621 FIXME("(%p,%p)\n", iface, pul);
626 static HRESULT WINAPI FolderImpl_Synchronize(Folder3 *iface)
628 FIXME("(%p)\n", iface);
633 static HRESULT WINAPI FolderImpl_get_HaveToShowWebViewBarricade(Folder3 *iface,
634 VARIANT_BOOL *pbHaveToShowWebViewBarricade)
636 FIXME("(%p,%p)\n", iface, pbHaveToShowWebViewBarricade);
641 static HRESULT WINAPI FolderImpl_DismissedWebViewBarricade(Folder3 *iface)
643 FIXME("(%p)\n", iface);
648 static HRESULT WINAPI FolderImpl_get_ShowWebViewBarricade(Folder3 *iface,
649 VARIANT_BOOL *pbShowWebViewBarricade)
651 FIXME("(%p,%p)\n", iface, pbShowWebViewBarricade);
656 static HRESULT WINAPI FolderImpl_put_ShowWebViewBarricade(Folder3 *iface,
657 VARIANT_BOOL bShowWebViewBarricade)
659 FIXME("(%p,%d)\n", iface, bShowWebViewBarricade);
664 static const Folder3Vtbl FolderImpl_Vtbl = {
665 FolderImpl_QueryInterface,
668 FolderImpl_GetTypeInfoCount,
669 FolderImpl_GetTypeInfo,
670 FolderImpl_GetIDsOfNames,
672 FolderImpl_get_Title,
673 FolderImpl_get_Application,
674 FolderImpl_get_Parent,
675 FolderImpl_get_ParentFolder,
677 FolderImpl_ParseName,
678 FolderImpl_NewFolder,
681 FolderImpl_GetDetailsOf,
683 FolderImpl_get_OfflineStatus,
684 FolderImpl_Synchronize,
685 FolderImpl_get_HaveToShowWebViewBarricade,
686 FolderImpl_DismissedWebViewBarricade,
687 FolderImpl_get_ShowWebViewBarricade,
688 FolderImpl_put_ShowWebViewBarricade
691 static HRESULT Folder_Constructor(VARIANT *dir, Folder **ppsdf)
701 /* FIXME: add some checks */
704 if (PathIsDirectoryW(V_BSTR(dir)) &&
705 !PathIsRelativeW(V_BSTR(dir)) &&
706 PathFileExistsW(V_BSTR(dir)))
712 This = HeapAlloc(GetProcessHeap(), 0, sizeof(FolderImpl));
713 if (!This) return E_OUTOFMEMORY;
714 This->Folder_iface.lpVtbl = &FolderImpl_Vtbl;
717 ret = load_type_info(&IID_Folder3, &This->iTypeInfo);
720 HeapFree(GetProcessHeap(), 0, This);
724 VariantInit(&This->dir);
725 ret = VariantCopy(&This->dir, dir);
728 ITypeInfo_Release(This->iTypeInfo);
729 HeapFree(GetProcessHeap(), 0, This);
730 return E_OUTOFMEMORY;
733 *ppsdf = (Folder*)This;
737 static HRESULT WINAPI ShellDispatch_QueryInterface(IShellDispatch2 *iface,
738 REFIID riid, LPVOID *ppv)
740 ShellDispatch *This = impl_from_IShellDispatch2(iface);
742 TRACE("(%p,%p,%p)\n", iface, riid, ppv);
744 if (!ppv) return E_INVALIDARG;
746 if (IsEqualIID(&IID_IUnknown, riid) ||
747 IsEqualIID(&IID_IDispatch, riid) ||
748 IsEqualIID(&IID_IShellDispatch, riid) ||
749 IsEqualIID(&IID_IShellDispatch2, riid))
753 FIXME("not implemented for %s\n", shdebugstr_guid(riid));
755 return E_NOINTERFACE;
758 IShellDispatch2_AddRef(iface);
762 static ULONG WINAPI ShellDispatch_AddRef(IShellDispatch2 *iface)
764 ShellDispatch *This = impl_from_IShellDispatch2(iface);
765 ULONG ref = InterlockedIncrement(&This->ref);
767 TRACE("(%p), new refcount=%i\n", iface, ref);
772 static ULONG WINAPI ShellDispatch_Release(IShellDispatch2 *iface)
774 ShellDispatch *This = impl_from_IShellDispatch2(iface);
775 ULONG ref = InterlockedDecrement(&This->ref);
777 TRACE("(%p), new refcount=%i\n", iface, ref);
781 ITypeInfo_Release(This->typeinfo);
782 HeapFree(GetProcessHeap(), 0, This);
787 static HRESULT WINAPI ShellDispatch_GetTypeInfoCount(IShellDispatch2 *iface,
790 TRACE("(%p,%p)\n", iface, pctinfo);
796 static HRESULT WINAPI ShellDispatch_GetTypeInfo(IShellDispatch2 *iface,
797 UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
799 ShellDispatch *This = impl_from_IShellDispatch2(iface);
801 TRACE("(%p,%u,%d,%p)\n", iface, iTInfo, lcid, ppTInfo);
803 ITypeInfo_AddRef(This->typeinfo);
804 *ppTInfo = This->typeinfo;
808 static HRESULT WINAPI ShellDispatch_GetIDsOfNames(IShellDispatch2 *iface,
809 REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
811 ShellDispatch *This = impl_from_IShellDispatch2(iface);
813 TRACE("(%p,%p,%p,%u,%d,%p)\n", iface, riid, rgszNames, cNames, lcid,
816 return ITypeInfo_GetIDsOfNames(This->typeinfo, rgszNames, cNames, rgDispId);
819 static HRESULT WINAPI ShellDispatch_Invoke(IShellDispatch2 *iface,
820 DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags,
821 DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo,
824 ShellDispatch *This = impl_from_IShellDispatch2(iface);
826 TRACE("(%p,%d,%p,%d,%u,%p,%p,%p,%p)\n", iface, dispIdMember, riid, lcid,
827 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
829 return ITypeInfo_Invoke(This->typeinfo, This, dispIdMember, wFlags,
830 pDispParams, pVarResult, pExcepInfo, puArgErr);
833 static HRESULT WINAPI ShellDispatch_get_Application(IShellDispatch2 *iface,
836 FIXME("(%p,%p)\n", iface, ppid);
842 static HRESULT WINAPI ShellDispatch_get_Parent(IShellDispatch2 *iface,
845 FIXME("(%p,%p)\n", iface, ppid);
851 static HRESULT WINAPI ShellDispatch_NameSpace(IShellDispatch2 *iface,
852 VARIANT vDir, Folder **ppsdf)
854 TRACE("(%p,%p)\n", iface, ppsdf);
856 return Folder_Constructor(&vDir, ppsdf);
859 static HRESULT WINAPI ShellDispatch_BrowseForFolder(IShellDispatch2 *iface,
860 LONG Hwnd, BSTR Title, LONG Options, VARIANT RootFolder, Folder **ppsdf)
862 FIXME("(%p,%x,%s,%x,%p)\n", iface, Hwnd, debugstr_w(Title), Options, ppsdf);
868 static HRESULT WINAPI ShellDispatch_Windows(IShellDispatch2 *iface,
871 FIXME("(%p,%p)\n", iface, ppid);
877 static HRESULT WINAPI ShellDispatch_Open(IShellDispatch2 *iface, VARIANT vDir)
879 FIXME("(%p)\n", iface);
884 static HRESULT WINAPI ShellDispatch_Explore(IShellDispatch2 *iface, VARIANT vDir)
886 FIXME("(%p)\n", iface);
891 static HRESULT WINAPI ShellDispatch_MinimizeAll(IShellDispatch2 *iface)
893 FIXME("(%p)\n", iface);
898 static HRESULT WINAPI ShellDispatch_UndoMinimizeALL(IShellDispatch2 *iface)
900 FIXME("(%p)\n", iface);
905 static HRESULT WINAPI ShellDispatch_FileRun(IShellDispatch2 *iface)
907 FIXME("(%p)\n", iface);
912 static HRESULT WINAPI ShellDispatch_CascadeWindows(IShellDispatch2 *iface)
914 FIXME("(%p)\n", iface);
919 static HRESULT WINAPI ShellDispatch_TileVertically(IShellDispatch2 *iface)
921 FIXME("(%p)\n", iface);
926 static HRESULT WINAPI ShellDispatch_TileHorizontally(IShellDispatch2 *iface)
928 FIXME("(%p)\n", iface);
933 static HRESULT WINAPI ShellDispatch_ShutdownWindows(IShellDispatch2 *iface)
935 FIXME("(%p)\n", iface);
940 static HRESULT WINAPI ShellDispatch_Suspend(IShellDispatch2 *iface)
942 FIXME("(%p)\n", iface);
947 static HRESULT WINAPI ShellDispatch_EjectPC(IShellDispatch2 *iface)
949 FIXME("(%p)\n", iface);
954 static HRESULT WINAPI ShellDispatch_SetTime(IShellDispatch2 *iface)
956 FIXME("(%p)\n", iface);
961 static HRESULT WINAPI ShellDispatch_TrayProperties(IShellDispatch2 *iface)
963 FIXME("(%p)\n", iface);
968 static HRESULT WINAPI ShellDispatch_Help(IShellDispatch2 *iface)
970 FIXME("(%p)\n", iface);
975 static HRESULT WINAPI ShellDispatch_FindFiles(IShellDispatch2 *iface)
977 FIXME("(%p)\n", iface);
982 static HRESULT WINAPI ShellDispatch_FindComputer(IShellDispatch2 *iface)
984 FIXME("(%p)\n", iface);
989 static HRESULT WINAPI ShellDispatch_RefreshMenu(IShellDispatch2 *iface)
991 FIXME("(%p)\n", iface);
996 static HRESULT WINAPI ShellDispatch_ControlPanelItem(IShellDispatch2 *iface,
999 FIXME("(%p,%s)\n", iface, debugstr_w(szDir));
1004 static HRESULT WINAPI ShellDispatch_IsRestricted(IShellDispatch2 *iface, BSTR group, BSTR restriction, LONG *value)
1006 FIXME("(%s, %s, %p): stub\n", debugstr_w(group), debugstr_w(restriction), value);
1010 static HRESULT WINAPI ShellDispatch_ShellExecute(IShellDispatch2 *iface, BSTR file, VARIANT args, VARIANT dir,
1011 VARIANT op, VARIANT show)
1013 FIXME("(%s): stub\n", debugstr_w(file));
1017 static HRESULT WINAPI ShellDispatch_FindPrinter(IShellDispatch2 *iface, BSTR name, BSTR location, BSTR model)
1019 FIXME("(%s, %s, %s): stub\n", debugstr_w(name), debugstr_w(location), debugstr_w(model));
1023 static HRESULT WINAPI ShellDispatch_GetSystemInformation(IShellDispatch2 *iface, BSTR name, VARIANT *ret)
1025 FIXME("(%s, %p): stub\n", debugstr_w(name), ret);
1029 static HRESULT WINAPI ShellDispatch_ServiceStart(IShellDispatch2 *iface, BSTR service, VARIANT persistent, VARIANT *ret)
1031 FIXME("(%s, %p): stub\n", debugstr_w(service), ret);
1035 static HRESULT WINAPI ShellDispatch_ServiceStop(IShellDispatch2 *iface, BSTR service, VARIANT persistent, VARIANT *ret)
1037 FIXME("(%s, %p): stub\n", debugstr_w(service), ret);
1041 static HRESULT WINAPI ShellDispatch_IsServiceRunning(IShellDispatch2 *iface, BSTR service, VARIANT *running)
1043 FIXME("(%s, %p): stub\n", debugstr_w(service), running);
1047 static HRESULT WINAPI ShellDispatch_CanStartStopService(IShellDispatch2 *iface, BSTR service, VARIANT *ret)
1049 FIXME("(%s, %p): stub\n", debugstr_w(service), ret);
1053 static HRESULT WINAPI ShellDispatch_ShowBrowserBar(IShellDispatch2 *iface, BSTR clsid, VARIANT show, VARIANT *ret)
1055 FIXME("(%s, %p): stub\n", debugstr_w(clsid), ret);
1059 static const IShellDispatch2Vtbl ShellDispatch2Vtbl = {
1060 ShellDispatch_QueryInterface,
1061 ShellDispatch_AddRef,
1062 ShellDispatch_Release,
1063 ShellDispatch_GetTypeInfoCount,
1064 ShellDispatch_GetTypeInfo,
1065 ShellDispatch_GetIDsOfNames,
1066 ShellDispatch_Invoke,
1067 ShellDispatch_get_Application,
1068 ShellDispatch_get_Parent,
1069 ShellDispatch_NameSpace,
1070 ShellDispatch_BrowseForFolder,
1071 ShellDispatch_Windows,
1073 ShellDispatch_Explore,
1074 ShellDispatch_MinimizeAll,
1075 ShellDispatch_UndoMinimizeALL,
1076 ShellDispatch_FileRun,
1077 ShellDispatch_CascadeWindows,
1078 ShellDispatch_TileVertically,
1079 ShellDispatch_TileHorizontally,
1080 ShellDispatch_ShutdownWindows,
1081 ShellDispatch_Suspend,
1082 ShellDispatch_EjectPC,
1083 ShellDispatch_SetTime,
1084 ShellDispatch_TrayProperties,
1086 ShellDispatch_FindFiles,
1087 ShellDispatch_FindComputer,
1088 ShellDispatch_RefreshMenu,
1089 ShellDispatch_ControlPanelItem,
1090 ShellDispatch_IsRestricted,
1091 ShellDispatch_ShellExecute,
1092 ShellDispatch_FindPrinter,
1093 ShellDispatch_GetSystemInformation,
1094 ShellDispatch_ServiceStart,
1095 ShellDispatch_ServiceStop,
1096 ShellDispatch_IsServiceRunning,
1097 ShellDispatch_CanStartStopService,
1098 ShellDispatch_ShowBrowserBar
1101 HRESULT WINAPI IShellDispatch_Constructor(IUnknown *outer, REFIID riid, void **ppv)
1103 ShellDispatch *This;
1106 TRACE("(%p, %s)\n", outer, debugstr_guid(riid));
1110 if (outer) return CLASS_E_NOAGGREGATION;
1112 This = HeapAlloc(GetProcessHeap(), 0, sizeof(ShellDispatch));
1113 if (!This) return E_OUTOFMEMORY;
1114 This->IShellDispatch2_iface.lpVtbl = &ShellDispatch2Vtbl;
1117 ret = load_type_info(&IID_IShellDispatch2, &This->typeinfo);
1120 HeapFree(GetProcessHeap(), 0, This);
1124 ret = IShellDispatch2_QueryInterface(&This->IShellDispatch2_iface, riid, ppv);
1125 IShellDispatch2_Release(&This->IShellDispatch2_iface);