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 IShellDispatch IShellDispatch_iface
;
56 FolderItem FolderItem_iface
;
62 static inline ShellDispatch
*impl_from_IShellDispatch(IShellDispatch
*iface
)
64 return CONTAINING_RECORD(iface
, ShellDispatch
, IShellDispatch_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(IShellDispatch
*iface
,
738 REFIID riid
, LPVOID
*ppv
)
740 ShellDispatch
*This
= impl_from_IShellDispatch(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
))
752 FIXME("not implemented for %s\n", shdebugstr_guid(riid
));
754 return E_NOINTERFACE
;
756 IUnknown_AddRef((IUnknown
*)*ppv
);
760 static ULONG WINAPI
ShellDispatch_AddRef(IShellDispatch
*iface
)
762 ShellDispatch
*This
= impl_from_IShellDispatch(iface
);
763 ULONG ref
= InterlockedIncrement(&This
->ref
);
765 TRACE("(%p), new refcount=%i\n", iface
, ref
);
770 static ULONG WINAPI
ShellDispatch_Release(IShellDispatch
*iface
)
772 ShellDispatch
*This
= impl_from_IShellDispatch(iface
);
773 ULONG ref
= InterlockedDecrement(&This
->ref
);
775 TRACE("(%p), new refcount=%i\n", iface
, ref
);
779 ITypeInfo_Release(This
->iTypeInfo
);
780 HeapFree(GetProcessHeap(), 0, This
);
785 static HRESULT WINAPI
ShellDispatch_GetTypeInfoCount(IShellDispatch
*iface
,
788 TRACE("(%p,%p)\n", iface
, pctinfo
);
794 static HRESULT WINAPI
ShellDispatch_GetTypeInfo(IShellDispatch
*iface
,
795 UINT iTInfo
, LCID lcid
, ITypeInfo
**ppTInfo
)
797 ShellDispatch
*This
= impl_from_IShellDispatch(iface
);
799 TRACE("(%p,%u,%d,%p)\n", iface
, iTInfo
, lcid
, ppTInfo
);
801 ITypeInfo_AddRef(This
->iTypeInfo
);
802 *ppTInfo
= This
->iTypeInfo
;
806 static HRESULT WINAPI
ShellDispatch_GetIDsOfNames(IShellDispatch
*iface
,
807 REFIID riid
, LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
809 ShellDispatch
*This
= impl_from_IShellDispatch(iface
);
811 TRACE("(%p,%p,%p,%u,%d,%p)\n", iface
, riid
, rgszNames
, cNames
, lcid
,
814 return ITypeInfo_GetIDsOfNames(This
->iTypeInfo
, rgszNames
, cNames
, rgDispId
);
817 static HRESULT WINAPI
ShellDispatch_Invoke(IShellDispatch
*iface
,
818 DISPID dispIdMember
, REFIID riid
, LCID lcid
, WORD wFlags
,
819 DISPPARAMS
*pDispParams
, VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
,
822 ShellDispatch
*This
= impl_from_IShellDispatch(iface
);
824 TRACE("(%p,%d,%p,%d,%u,%p,%p,%p,%p)\n", iface
, dispIdMember
, riid
, lcid
,
825 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
827 return ITypeInfo_Invoke(This
->iTypeInfo
, This
, dispIdMember
, wFlags
,
828 pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
831 static HRESULT WINAPI
ShellDispatch_get_Application(IShellDispatch
*iface
,
834 FIXME("(%p,%p)\n", iface
, ppid
);
840 static HRESULT WINAPI
ShellDispatch_get_Parent(IShellDispatch
*iface
,
843 FIXME("(%p,%p)\n", iface
, ppid
);
849 static HRESULT WINAPI
ShellDispatch_NameSpace(IShellDispatch
*iface
,
850 VARIANT vDir
, Folder
**ppsdf
)
852 TRACE("(%p,%p)\n", iface
, ppsdf
);
854 return Folder_Constructor(&vDir
, ppsdf
);
857 static HRESULT WINAPI
ShellDispatch_BrowseForFolder(IShellDispatch
*iface
,
858 LONG Hwnd
, BSTR Title
, LONG Options
, VARIANT RootFolder
, Folder
**ppsdf
)
860 FIXME("(%p,%x,%s,%x,%p)\n", iface
, Hwnd
, debugstr_w(Title
), Options
, ppsdf
);
866 static HRESULT WINAPI
ShellDispatch_Windows(IShellDispatch
*iface
,
869 FIXME("(%p,%p)\n", iface
, ppid
);
875 static HRESULT WINAPI
ShellDispatch_Open(IShellDispatch
*iface
, VARIANT vDir
)
877 FIXME("(%p)\n", iface
);
882 static HRESULT WINAPI
ShellDispatch_Explore(IShellDispatch
*iface
, VARIANT vDir
)
884 FIXME("(%p)\n", iface
);
889 static HRESULT WINAPI
ShellDispatch_MinimizeAll(IShellDispatch
*iface
)
891 FIXME("(%p)\n", iface
);
896 static HRESULT WINAPI
ShellDispatch_UndoMinimizeALL(IShellDispatch
*iface
)
898 FIXME("(%p)\n", iface
);
903 static HRESULT WINAPI
ShellDispatch_FileRun(IShellDispatch
*iface
)
905 FIXME("(%p)\n", iface
);
910 static HRESULT WINAPI
ShellDispatch_CascadeWindows(IShellDispatch
*iface
)
912 FIXME("(%p)\n", iface
);
917 static HRESULT WINAPI
ShellDispatch_TileVertically(IShellDispatch
*iface
)
919 FIXME("(%p)\n", iface
);
924 static HRESULT WINAPI
ShellDispatch_TileHorizontally(IShellDispatch
*iface
)
926 FIXME("(%p)\n", iface
);
931 static HRESULT WINAPI
ShellDispatch_ShutdownWindows(IShellDispatch
*iface
)
933 FIXME("(%p)\n", iface
);
938 static HRESULT WINAPI
ShellDispatch_Suspend(IShellDispatch
*iface
)
940 FIXME("(%p)\n", iface
);
945 static HRESULT WINAPI
ShellDispatch_EjectPC(IShellDispatch
*iface
)
947 FIXME("(%p)\n", iface
);
952 static HRESULT WINAPI
ShellDispatch_SetTime(IShellDispatch
*iface
)
954 FIXME("(%p)\n", iface
);
959 static HRESULT WINAPI
ShellDispatch_TrayProperties(IShellDispatch
*iface
)
961 FIXME("(%p)\n", iface
);
966 static HRESULT WINAPI
ShellDispatch_Help(IShellDispatch
*iface
)
968 FIXME("(%p)\n", iface
);
973 static HRESULT WINAPI
ShellDispatch_FindFiles(IShellDispatch
*iface
)
975 FIXME("(%p)\n", iface
);
980 static HRESULT WINAPI
ShellDispatch_FindComputer(IShellDispatch
*iface
)
982 FIXME("(%p)\n", iface
);
987 static HRESULT WINAPI
ShellDispatch_RefreshMenu(IShellDispatch
*iface
)
989 FIXME("(%p)\n", iface
);
994 static HRESULT WINAPI
ShellDispatch_ControlPanelItem(IShellDispatch
*iface
,
997 FIXME("(%p,%s)\n", iface
, debugstr_w(szDir
));
1002 static const IShellDispatchVtbl ShellDispatch_Vtbl
= {
1003 ShellDispatch_QueryInterface
,
1004 ShellDispatch_AddRef
,
1005 ShellDispatch_Release
,
1006 ShellDispatch_GetTypeInfoCount
,
1007 ShellDispatch_GetTypeInfo
,
1008 ShellDispatch_GetIDsOfNames
,
1009 ShellDispatch_Invoke
,
1010 ShellDispatch_get_Application
,
1011 ShellDispatch_get_Parent
,
1012 ShellDispatch_NameSpace
,
1013 ShellDispatch_BrowseForFolder
,
1014 ShellDispatch_Windows
,
1016 ShellDispatch_Explore
,
1017 ShellDispatch_MinimizeAll
,
1018 ShellDispatch_UndoMinimizeALL
,
1019 ShellDispatch_FileRun
,
1020 ShellDispatch_CascadeWindows
,
1021 ShellDispatch_TileVertically
,
1022 ShellDispatch_TileHorizontally
,
1023 ShellDispatch_ShutdownWindows
,
1024 ShellDispatch_Suspend
,
1025 ShellDispatch_EjectPC
,
1026 ShellDispatch_SetTime
,
1027 ShellDispatch_TrayProperties
,
1029 ShellDispatch_FindFiles
,
1030 ShellDispatch_FindComputer
,
1031 ShellDispatch_RefreshMenu
,
1032 ShellDispatch_ControlPanelItem
1035 HRESULT WINAPI
IShellDispatch_Constructor(IUnknown
*pUnkOuter
, REFIID riid
,
1038 ShellDispatch
*This
;
1041 TRACE("(%p,%s)\n", pUnkOuter
, debugstr_guid(riid
));
1045 if (pUnkOuter
) return CLASS_E_NOAGGREGATION
;
1047 This
= HeapAlloc(GetProcessHeap(), 0, sizeof(ShellDispatch
));
1048 if (!This
) return E_OUTOFMEMORY
;
1049 This
->IShellDispatch_iface
.lpVtbl
= &ShellDispatch_Vtbl
;
1052 ret
= load_type_info(&IID_IShellDispatch
, &This
->iTypeInfo
);
1055 HeapFree(GetProcessHeap(), 0, This
);
1059 ret
= ShellDispatch_QueryInterface(&This
->IShellDispatch_iface
, riid
, ppv
);
1060 ShellDispatch_Release(&This
->IShellDispatch_iface
);