Nikolay Sivov : shell32: Added IDispatch support for IShellFolderViewDual3.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri May 8 05:21:28 CDT 2015
Module: wine
Branch: master
Commit: 7ce1813fed11ec657a972e5a4774dcccb128c33c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7ce1813fed11ec657a972e5a4774dcccb128c33c
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Fri May 8 07:44:13 2015 +0300
shell32: Added IDispatch support for IShellFolderViewDual3.
---
dlls/shell32/shell32_main.h | 10 ++++++++++
dlls/shell32/shelldispatch.c | 13 ++++---------
dlls/shell32/shlview.c | 41 +++++++++++++++++++++++++++++++++--------
3 files changed, 47 insertions(+), 17 deletions(-)
diff --git a/dlls/shell32/shell32_main.h b/dlls/shell32/shell32_main.h
index 954f1e4..18503eb 100644
--- a/dlls/shell32/shell32_main.h
+++ b/dlls/shell32/shell32_main.h
@@ -229,6 +229,16 @@ BOOL AddToEnumList(IEnumIDListImpl *list, LPITEMIDLIST pidl) DECLSPEC_HIDDEN;
*/
BOOL CreateFolderEnumList(IEnumIDListImpl *list, LPCWSTR lpszPath, DWORD dwFlags) DECLSPEC_HIDDEN;
+enum tid_t {
+ NULL_tid,
+ IShellDispatch6_tid,
+ IShellFolderViewDual3_tid,
+ Folder3_tid,
+ FolderItem2_tid,
+ LAST_tid
+};
+
+HRESULT get_typeinfo(enum tid_t, ITypeInfo**) DECLSPEC_HIDDEN;
void release_typelib(void) DECLSPEC_HIDDEN;
void release_desktop_folder(void) DECLSPEC_HIDDEN;
diff --git a/dlls/shell32/shelldispatch.c b/dlls/shell32/shelldispatch.c
index e39d0f1..f168477 100644
--- a/dlls/shell32/shelldispatch.c
+++ b/dlls/shell32/shelldispatch.c
@@ -34,23 +34,18 @@
#include "shldisp.h"
#include "debughlp.h"
+#include "shell32_main.h"
+
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
-enum tid_t {
- NULL_tid,
- IShellDispatch6_tid,
- Folder3_tid,
- FolderItem2_tid,
- LAST_tid
-};
-
static ITypeLib *typelib;
static const IID * const tid_ids[] =
{
&IID_NULL,
&IID_IShellDispatch6,
+ &IID_IShellFolderViewDual3,
&IID_Folder3,
&IID_FolderItem2
};
@@ -118,7 +113,7 @@ void release_typelib(void)
ITypeLib_Release(typelib);
}
-static HRESULT get_typeinfo(enum tid_t tid, ITypeInfo **typeinfo)
+HRESULT get_typeinfo(enum tid_t tid, ITypeInfo **typeinfo)
{
HRESULT hr;
diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c
index 6ddb937..e6691f8 100644
--- a/dlls/shell32/shlview.c
+++ b/dlls/shell32/shlview.c
@@ -3483,16 +3483,23 @@ static ULONG WINAPI shellfolderviewdual_Release(IShellFolderViewDual3 *iface)
static HRESULT WINAPI shellfolderviewdual_GetTypeInfoCount(IShellFolderViewDual3 *iface, UINT *pctinfo)
{
IShellViewImpl *This = impl_from_IShellFolderViewDual3(iface);
- FIXME("%p\n", This);
- return E_NOTIMPL;
+ TRACE("%p %p\n", This, pctinfo);
+ *pctinfo = 1;
+ return S_OK;
}
static HRESULT WINAPI shellfolderviewdual_GetTypeInfo(IShellFolderViewDual3 *iface,
UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
{
IShellViewImpl *This = impl_from_IShellFolderViewDual3(iface);
- FIXME("%p\n", This);
- return E_NOTIMPL;
+ HRESULT hr;
+
+ TRACE("(%p,%u,%d,%p)\n", This, iTInfo, lcid, ppTInfo);
+
+ hr = get_typeinfo(IShellFolderViewDual3_tid, ppTInfo);
+ if (SUCCEEDED(hr))
+ ITypeInfo_AddRef(*ppTInfo);
+ return hr;
}
static HRESULT WINAPI shellfolderviewdual_GetIDsOfNames(
@@ -3500,8 +3507,16 @@ static HRESULT WINAPI shellfolderviewdual_GetIDsOfNames(
cNames, LCID lcid, DISPID *rgDispId)
{
IShellViewImpl *This = impl_from_IShellFolderViewDual3(iface);
- FIXME("%p\n", This);
- return E_NOTIMPL;
+ ITypeInfo *ti;
+ HRESULT hr;
+
+ TRACE("(%p,%p,%p,%u,%d,%p)\n", This, riid, rgszNames, cNames, lcid,
+ rgDispId);
+
+ hr = get_typeinfo(IShellFolderViewDual3_tid, &ti);
+ if (SUCCEEDED(hr))
+ hr = ITypeInfo_GetIDsOfNames(ti, rgszNames, cNames, rgDispId);
+ return hr;
}
static HRESULT WINAPI shellfolderviewdual_Invoke(IShellFolderViewDual3 *iface,
@@ -3510,8 +3525,18 @@ static HRESULT WINAPI shellfolderviewdual_Invoke(IShellFolderViewDual3 *iface,
UINT *puArgErr)
{
IShellViewImpl *This = impl_from_IShellFolderViewDual3(iface);
- FIXME("%p\n", This);
- return E_NOTIMPL;
+ ITypeInfo *ti;
+ HRESULT hr;
+
+ TRACE("(%p,%d,%p,%d,%u,%p,%p,%p,%p)\n", This, dispIdMember, riid, lcid,
+ wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
+
+ hr = get_typeinfo(IShellFolderViewDual3_tid, &ti);
+ if (SUCCEEDED(hr))
+ hr = ITypeInfo_Invoke(ti, &This->IShellFolderViewDual3_iface, dispIdMember, wFlags, pDispParams,
+ pVarResult, pExcepInfo, puArgErr);
+ return hr;
+
}
static HRESULT WINAPI shellfolderviewdual_get_Application(IShellFolderViewDual3 *iface,
More information about the wine-cvs
mailing list