Author: mjansen
Date: Mon Apr 11 18:28:31 2016
New Revision: 71144
URL:
http://svn.reactos.org/svn/reactos?rev=71144&view=rev
Log:
[SHELL32][SHELL32_WINETEST] Connect CDefViewDual to CDefView to fix crashes in the
shelldispatch test ROSTESTS-209
- CDefViewDual::get_Application now returns a new CDefView to fix the winetest.
- Update CFolder, CFolderItem(s), CFolderItemVerb(s), CShell to use the new IDispatchImpl
- Enable the last two skipped testcases (test_ShellFolderViewDual, test_ShellWindows)
Modified:
trunk/reactos/dll/win32/shell32/CDefViewDual.cpp
trunk/reactos/dll/win32/shell32/CFolder.cpp
trunk/reactos/dll/win32/shell32/CFolder.h
trunk/reactos/dll/win32/shell32/CFolderItemVerbs.cpp
trunk/reactos/dll/win32/shell32/CFolderItemVerbs.h
trunk/reactos/dll/win32/shell32/CFolderItems.cpp
trunk/reactos/dll/win32/shell32/CFolderItems.h
trunk/reactos/dll/win32/shell32/CShell.cpp
trunk/reactos/dll/win32/shell32/CShell.h
trunk/reactos/dll/win32/shell32/wine/shell32_main.h
trunk/rostests/winetests/shell32/shelldispatch.c
Modified: trunk/reactos/dll/win32/shell32/CDefViewDual.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CDefView…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CDefViewDual.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/CDefViewDual.cpp [iso-8859-1] Mon Apr 11 18:28:31
2016
@@ -46,9 +46,8 @@
virtual HRESULT STDMETHODCALLTYPE get_Application(IDispatch **app) override
{
if (!app) return E_INVALIDARG;
- *app = NULL;
- FIXME("CDefViewDual::get_Application is UNIMPLEMENTED (%p, %p)\n",
this, app);
- return E_NOTIMPL;
+
+ return CShell_Constructor(IID_IDispatch, (LPVOID*)app);
}
virtual HRESULT STDMETHODCALLTYPE get_Parent(IDispatch **parent) override
Modified: trunk/reactos/dll/win32/shell32/CFolder.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CFolder.…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CFolder.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/CFolder.cpp [iso-8859-1] Mon Apr 11 18:28:31 2016
@@ -36,38 +36,30 @@
m_idlist.Attach(idlist);
}
-// *** IDispatch methods ***
-HRESULT STDMETHODCALLTYPE CFolder::GetTypeInfoCount(UINT *pctinfo)
+HRESULT CFolder::GetShellFolder(CComPtr<IShellFolder>& psfCurrent)
{
- TRACE("(%p, %p)\n", this, pctinfo);
- return E_NOTIMPL;
+ CComPtr<IShellFolder> psfDesktop;
+
+ HRESULT hr = SHGetDesktopFolder(&psfDesktop);
+ if (FAILED_UNEXPECTEDLY(hr))
+ return hr;
+
+ return psfDesktop->BindToObject(m_idlist, NULL, IID_PPV_ARG(IShellFolder,
&psfCurrent));
}
-
-HRESULT STDMETHODCALLTYPE CFolder::GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo
**ppTInfo)
-{
- TRACE("(%p, %lu, %lu, %p)\n", this, iTInfo, lcid, ppTInfo);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CFolder::GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT
cNames, LCID lcid, DISPID *rgDispId)
-{
- TRACE("(%p, %s, %p, %lu, %lu, %p)\n", this, wine_dbgstr_guid(&riid),
rgszNames, cNames, lcid, rgDispId);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CFolder::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid,
WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT
*puArgErr)
-{
- TRACE("(%p, %lu, %s, %lu, %lu, %p, %p, %p, %p)\n", this, dispIdMember,
wine_dbgstr_guid(&riid), lcid, (DWORD)wFlags,
- pDispParams, pVarResult, pExcepInfo, puArgErr);
- return E_NOTIMPL;
-}
-
// *** Folder methods ***
HRESULT STDMETHODCALLTYPE CFolder::get_Title(BSTR *pbs)
{
- TRACE("(%p, %p)\n", this, pbs);
- return E_NOTIMPL;
+ if (!pbs)
+ return E_POINTER;
+
+ WCHAR path[MAX_PATH+2] = {0};
+ HRESULT hr = ILGetDisplayNameExW(NULL, m_idlist, path, ILGDN_INFOLDER);
+ if (FAILED_UNEXPECTEDLY(hr))
+ return hr;
+
+ *pbs = SysAllocString(path);
+ return S_OK;
}
HRESULT STDMETHODCALLTYPE CFolder::get_Application(IDispatch **ppid)
@@ -97,15 +89,12 @@
HRESULT STDMETHODCALLTYPE CFolder::ParseName(BSTR bName, FolderItem **ppid)
{
TRACE("(%p, %s, %p)\n", this, wine_dbgstr_w(bName), ppid);
-
- CComPtr<IShellFolder> psfDesktop;
-
- HRESULT hr = SHGetDesktopFolder(&psfDesktop);
- if (FAILED_UNEXPECTEDLY(hr))
- return hr;
+ if (!ppid)
+ return E_POINTER;
+ *ppid = NULL;
CComPtr<IShellFolder> psfCurrent;
- hr = psfDesktop->BindToObject(m_idlist, NULL, IID_PPV_ARG(IShellFolder,
&psfCurrent));
+ HRESULT hr = GetShellFolder(psfCurrent);
if (FAILED_UNEXPECTEDLY(hr))
return hr;
Modified: trunk/reactos/dll/win32/shell32/CFolder.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CFolder.…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CFolder.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/CFolder.h [iso-8859-1] Mon Apr 11 18:28:31 2016
@@ -25,9 +25,11 @@
class CFolder:
public CComCoClass<CFolder>,
public CComObjectRootEx<CComMultiThreadModelNoCS>,
- public Folder2
+ public IDispatchImpl<Folder2, &IID_Folder2>
{
private:
+ HRESULT GetShellFolder(CComPtr<IShellFolder>& psfCurrent);
+
CComHeapPtr<ITEMIDLIST> m_idlist;
public:
@@ -35,13 +37,6 @@
~CFolder();
void Init(LPITEMIDLIST idlist);
-
- // *** IDispatch methods ***
- virtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount(UINT *pctinfo);
- virtual HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo
**ppTInfo);
- virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames,
UINT cNames, LCID lcid, DISPID *rgDispId);
- virtual HRESULT STDMETHODCALLTYPE Invoke(DISPID dispIdMember, REFIID riid, LCID lcid,
WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT
*puArgErr);
-
// *** Folder methods ***
virtual HRESULT STDMETHODCALLTYPE get_Title(BSTR *pbs);
Modified: trunk/reactos/dll/win32/shell32/CFolderItemVerbs.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CFolderI…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CFolderItemVerbs.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/CFolderItemVerbs.cpp [iso-8859-1] Mon Apr 11 18:28:31
2016
@@ -31,35 +31,10 @@
{
}
-//void CFolderItemVerb::Init(LPITEMIDLIST idlist)
-//{
-// m_idlist.Attach(idlist);
-//}
-
-// *** IDispatch methods ***
-HRESULT STDMETHODCALLTYPE CFolderItemVerb::GetTypeInfoCount(UINT *pctinfo)
+void CFolderItemVerb::Init(IContextMenu* menu, BSTR name)
{
- TRACE("(%p, %p)\n", this, pctinfo);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CFolderItemVerb::GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo
**ppTInfo)
-{
- TRACE("(%p, %lu, %lu, %p)\n", this, iTInfo, lcid, ppTInfo);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CFolderItemVerb::GetIDsOfNames(REFIID riid, LPOLESTR
*rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
-{
- TRACE("(%p, %s, %p, %lu, %lu, %p)\n", this, wine_dbgstr_guid(&riid),
rgszNames, cNames, lcid, rgDispId);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CFolderItemVerb::Invoke(DISPID dispIdMember, REFIID riid, LCID
lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo,
UINT *puArgErr)
-{
- TRACE("(%p, %lu, %s, %lu, %lu, %p, %p, %p, %p)\n", this, dispIdMember,
wine_dbgstr_guid(&riid), lcid, (DWORD)wFlags,
- pDispParams, pVarResult, pExcepInfo, puArgErr);
- return E_NOTIMPL;
+ m_contextmenu = menu;
+ m_name.m_str = name;
}
// *** FolderItemVerb methods ***
@@ -78,12 +53,10 @@
HRESULT STDMETHODCALLTYPE CFolderItemVerb::get_Name(BSTR *pbs)
{
- TRACE("(%p, %p)\n", this, pbs);
if (!pbs)
return E_POINTER;
- // Terminating item:
- *pbs = SysAllocString(L"");
- return E_NOTIMPL;
+ *pbs = SysAllocString(m_name);
+ return S_OK;
}
HRESULT STDMETHODCALLTYPE CFolderItemVerb::DoIt()
@@ -98,52 +71,45 @@
CFolderItemVerbs::CFolderItemVerbs()
+ :m_menu(NULL)
+ ,m_count(0)
{
}
CFolderItemVerbs::~CFolderItemVerbs()
{
+ DestroyMenu(m_menu);
}
-//void CFolderItemVerbs::Init(LPITEMIDLIST idlist)
-//{
-// m_idlist.Attach(idlist);
-//}
+HRESULT CFolderItemVerbs::Init(LPITEMIDLIST idlist)
+{
+ CComPtr<IShellFolder> folder;
+ LPCITEMIDLIST child;
+ HRESULT hr = SHBindToParent(idlist, IID_PPV_ARG(IShellFolder, &folder),
&child);
+ if (FAILED_UNEXPECTEDLY(hr))
+ return hr;
-// *** IDispatch methods ***
-HRESULT STDMETHODCALLTYPE CFolderItemVerbs::GetTypeInfoCount(UINT *pctinfo)
-{
- TRACE("(%p, %p)\n", this, pctinfo);
- return E_NOTIMPL;
+ hr = folder->GetUIObjectOf(NULL, 1, &child, IID_IContextMenu, NULL,
(PVOID*)&m_contextmenu);
+ if (FAILED_UNEXPECTEDLY(hr))
+ return hr;
+
+ m_menu = CreatePopupMenu();
+ hr = m_contextmenu->QueryContextMenu(m_menu, 0, FCIDM_SHVIEWFIRST,
FCIDM_SHVIEWLAST, CMF_NORMAL);
+ if (!SUCCEEDED(hr))
+ return hr;
+
+ m_count = GetMenuItemCount(m_menu);
+ return hr;
}
-HRESULT STDMETHODCALLTYPE CFolderItemVerbs::GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo
**ppTInfo)
-{
- TRACE("(%p, %lu, %lu, %p)\n", this, iTInfo, lcid, ppTInfo);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CFolderItemVerbs::GetIDsOfNames(REFIID riid, LPOLESTR
*rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
-{
- TRACE("(%p, %s, %p, %lu, %lu, %p)\n", this, wine_dbgstr_guid(&riid),
rgszNames, cNames, lcid, rgDispId);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CFolderItemVerbs::Invoke(DISPID dispIdMember, REFIID riid, LCID
lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo,
UINT *puArgErr)
-{
- TRACE("(%p, %lu, %s, %lu, %lu, %p, %p, %p, %p)\n", this, dispIdMember,
wine_dbgstr_guid(&riid), lcid, (DWORD)wFlags,
- pDispParams, pVarResult, pExcepInfo, puArgErr);
- return E_NOTIMPL;
-}
// *** FolderItemVerbs methods ***
HRESULT STDMETHODCALLTYPE CFolderItemVerbs::get_Count(LONG *plCount)
{
- TRACE("(%p, %p)\n", this, plCount);
if (!plCount)
return E_POINTER;
- *plCount = 0;
- return E_NOTIMPL;
+ *plCount = m_count;
+ return S_OK;
}
HRESULT STDMETHODCALLTYPE CFolderItemVerbs::get_Application(IDispatch **ppid)
@@ -158,18 +124,51 @@
return E_NOTIMPL;
}
-HRESULT STDMETHODCALLTYPE CFolderItemVerbs::Item(VARIANT index, FolderItemVerb **ppid)
+HRESULT STDMETHODCALLTYPE CFolderItemVerbs::Item(VARIANT indexVar, FolderItemVerb
**ppid)
{
- TRACE("(%p, %s, %p)\n", this, wine_dbgstr_variant(&index), ppid);
if (!ppid)
return E_POINTER;
- /* FIXME! */
+ CComVariant var;
+ VariantCopyInd(&var, &indexVar);
+
+ HRESULT hr = VariantChangeType(&var, &var, 0, VT_I4);
+ if (FAILED_UNEXPECTEDLY(hr))
+ return E_INVALIDARG;
+
+ int index = V_I4(&var);
+
+ if (index > m_count)
+ return S_OK;
+
+ BSTR name = NULL;
+
+ if(index == m_count)
+ name = SysAllocStringLen(NULL, 0);
+ else
+ {
+ MENUITEMINFOW info = { sizeof(info), 0 };
+ info.fMask = MIIM_STRING;
+ if (!GetMenuItemInfoW(m_menu, index, TRUE, &info))
+ return E_FAIL;
+ name = SysAllocStringLen(NULL, info.cch);
+ if (name)
+ {
+ info.dwTypeData = name;
+ info.cch++;
+ GetMenuItemInfoW(m_menu, index, TRUE, &info);
+ }
+ }
+
+ if (!name)
+ return E_OUTOFMEMORY;
+
CFolderItemVerb* verb = new CComObject<CFolderItemVerb>();
+ verb->Init(m_contextmenu, name);
verb->AddRef();
*ppid = verb;
- return E_NOTIMPL;
+ return S_OK;
}
HRESULT STDMETHODCALLTYPE CFolderItemVerbs::_NewEnum(IUnknown **ppunk)
Modified: trunk/reactos/dll/win32/shell32/CFolderItemVerbs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CFolderI…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CFolderItemVerbs.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/CFolderItemVerbs.h [iso-8859-1] Mon Apr 11 18:28:31
2016
@@ -24,22 +24,17 @@
class CFolderItemVerb:
public CComCoClass<CFolderItemVerb>,
public CComObjectRootEx<CComMultiThreadModelNoCS>,
- public FolderItemVerb
+ public IDispatchImpl<FolderItemVerb, &IID_FolderItemVerb>
{
private:
+ CComPtr<IContextMenu> m_contextmenu;
+ CComBSTR m_name;
public:
CFolderItemVerb();
~CFolderItemVerb();
- //void Init(LPITEMIDLIST idlist);
-
-
- // *** IDispatch methods ***
- virtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount(UINT *pctinfo);
- virtual HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo
**ppTInfo);
- virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames,
UINT cNames, LCID lcid, DISPID *rgDispId);
- virtual HRESULT STDMETHODCALLTYPE Invoke(DISPID dispIdMember, REFIID riid, LCID lcid,
WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT
*puArgErr);
+ void Init(IContextMenu* menu, BSTR name);
// *** FolderItemVerb methods ***
virtual HRESULT STDMETHODCALLTYPE get_Application(IDispatch **ppid);
@@ -61,22 +56,18 @@
class CFolderItemVerbs:
public CComCoClass<CFolderItemVerbs>,
public CComObjectRootEx<CComMultiThreadModelNoCS>,
- public FolderItemVerbs
+ public IDispatchImpl<FolderItemVerbs, &IID_FolderItemVerbs>
{
private:
+ CComPtr<IContextMenu> m_contextmenu;
+ HMENU m_menu;
+ int m_count;
public:
CFolderItemVerbs();
- ~CFolderItemVerbs();
+ virtual ~CFolderItemVerbs();
- //void Init(LPITEMIDLIST idlist);
-
-
- // *** IDispatch methods ***
- virtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount(UINT *pctinfo);
- virtual HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo
**ppTInfo);
- virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames,
UINT cNames, LCID lcid, DISPID *rgDispId);
- virtual HRESULT STDMETHODCALLTYPE Invoke(DISPID dispIdMember, REFIID riid, LCID lcid,
WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT
*puArgErr);
+ HRESULT Init(LPITEMIDLIST idlist);
// *** FolderItemVerbs methods ***
virtual HRESULT STDMETHODCALLTYPE get_Count(LONG *plCount);
Modified: trunk/reactos/dll/win32/shell32/CFolderItems.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CFolderI…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CFolderItems.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/CFolderItems.cpp [iso-8859-1] Mon Apr 11 18:28:31
2016
@@ -36,32 +36,6 @@
m_idlist.Attach(idlist);
}
-// *** IDispatch methods ***
-HRESULT STDMETHODCALLTYPE CFolderItem::GetTypeInfoCount(UINT *pctinfo)
-{
- TRACE("(%p, %p)\n", this, pctinfo);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CFolderItem::GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo
**ppTInfo)
-{
- TRACE("(%p, %lu, %lu, %p)\n", this, iTInfo, lcid, ppTInfo);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CFolderItem::GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames,
UINT cNames, LCID lcid, DISPID *rgDispId)
-{
- TRACE("(%p, %s, %p, %lu, %lu, %p)\n", this, wine_dbgstr_guid(&riid),
rgszNames, cNames, lcid, rgDispId);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CFolderItem::Invoke(DISPID dispIdMember, REFIID riid, LCID
lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo,
UINT *puArgErr)
-{
- TRACE("(%p, %lu, %s, %lu, %lu, %p, %p, %p, %p)\n", this, dispIdMember,
wine_dbgstr_guid(&riid), lcid, (DWORD)wFlags,
- pDispParams, pVarResult, pExcepInfo, puArgErr);
- return E_NOTIMPL;
-}
-
// *** FolderItem methods ***
HRESULT STDMETHODCALLTYPE CFolderItem::get_Application(IDispatch **ppid)
{
@@ -165,9 +139,15 @@
HRESULT STDMETHODCALLTYPE CFolderItem::Verbs(FolderItemVerbs **ppfic)
{
- if(!ppfic)
+ if (!ppfic)
return E_POINTER;
CFolderItemVerbs* verbs = new CComObject<CFolderItemVerbs>();
+ HRESULT hr = verbs->Init(m_idlist);
+ if (FAILED_UNEXPECTEDLY(hr))
+ {
+ delete verbs;
+ return hr;
+ }
verbs->AddRef();
*ppfic = verbs;
return S_OK;
@@ -181,40 +161,12 @@
-
-
CFolderItems::CFolderItems()
{
}
CFolderItems::~CFolderItems()
{
-}
-
-// *** IDispatch methods ***
-HRESULT STDMETHODCALLTYPE CFolderItems::GetTypeInfoCount(UINT *pctinfo)
-{
- TRACE("(%p, %p)\n", this, pctinfo);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CFolderItems::GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo
**ppTInfo)
-{
- TRACE("(%p, %lu, %lu, %p)\n", this, iTInfo, lcid, ppTInfo);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CFolderItems::GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames,
UINT cNames, LCID lcid, DISPID *rgDispId)
-{
- TRACE("(%p, %s, %p, %lu, %lu, %p)\n", this, wine_dbgstr_guid(&riid),
rgszNames, cNames, lcid, rgDispId);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CFolderItems::Invoke(DISPID dispIdMember, REFIID riid, LCID
lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo,
UINT *puArgErr)
-{
- TRACE("(%p, %lu, %s, %lu, %lu, %p, %p, %p, %p)\n", this, dispIdMember,
wine_dbgstr_guid(&riid), lcid, (DWORD)wFlags,
- pDispParams, pVarResult, pExcepInfo, puArgErr);
- return E_NOTIMPL;
}
// *** FolderItems methods ***
Modified: trunk/reactos/dll/win32/shell32/CFolderItems.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CFolderI…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CFolderItems.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/CFolderItems.h [iso-8859-1] Mon Apr 11 18:28:31 2016
@@ -25,7 +25,7 @@
class CFolderItem:
public CComCoClass<CFolderItem>,
public CComObjectRootEx<CComMultiThreadModelNoCS>,
- public FolderItem
+ public IDispatchImpl<FolderItem, &IID_FolderItem>
{
private:
CComHeapPtr<ITEMIDLIST> m_idlist;
@@ -36,12 +36,6 @@
void Init(LPITEMIDLIST idlist);
-
- // *** IDispatch methods ***
- virtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount(UINT *pctinfo);
- virtual HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo
**ppTInfo);
- virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames,
UINT cNames, LCID lcid, DISPID *rgDispId);
- virtual HRESULT STDMETHODCALLTYPE Invoke(DISPID dispIdMember, REFIID riid, LCID lcid,
WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT
*puArgErr);
// *** FolderItem methods ***
virtual HRESULT STDMETHODCALLTYPE get_Application(IDispatch **ppid);
@@ -75,19 +69,13 @@
class CFolderItems:
public CComCoClass<CFolderItems>,
public CComObjectRootEx<CComMultiThreadModelNoCS>,
- public FolderItems
+ public IDispatchImpl<FolderItems, &IID_FolderItems>
{
private:
public:
CFolderItems();
~CFolderItems();
-
- // *** IDispatch methods ***
- virtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount(UINT *pctinfo);
- virtual HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo
**ppTInfo);
- virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames,
UINT cNames, LCID lcid, DISPID *rgDispId);
- virtual HRESULT STDMETHODCALLTYPE Invoke(DISPID dispIdMember, REFIID riid, LCID lcid,
WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT
*puArgErr);
// *** FolderItems methods ***
virtual HRESULT STDMETHODCALLTYPE get_Count(long *plCount);
Modified: trunk/reactos/dll/win32/shell32/CShell.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CShell.c…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CShell.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/CShell.cpp [iso-8859-1] Mon Apr 11 18:28:31 2016
@@ -31,33 +31,10 @@
{
}
-
-// *** IDispatch methods ***
-HRESULT STDMETHODCALLTYPE CShell::GetTypeInfoCount(UINT *pctinfo)
-{
- TRACE("(%p, %p)\n", this, pctinfo);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo
**ppTInfo)
-{
- TRACE("(%p, %lu, %lu, %p)\n", this, iTInfo, lcid, ppTInfo);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT
cNames, LCID lcid, DISPID *rgDispId)
-{
- TRACE("(%p, %s, %p, %lu, %lu, %p)\n", this, wine_dbgstr_guid(&riid),
rgszNames, cNames, lcid, rgDispId);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid,
WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT
*puArgErr)
-{
- TRACE("(%p, %lu, %s, %lu, %lu, %p, %p, %p, %p)\n", this, dispIdMember,
wine_dbgstr_guid(&riid), lcid, (DWORD)wFlags,
- pDispParams, pVarResult, pExcepInfo, puArgErr);
- return E_NOTIMPL;
-}
-
+HRESULT CShell::Initialize()
+{
+ return S_OK;
+}
// *** IShellDispatch methods ***
HRESULT STDMETHODCALLTYPE CShell::get_Application(IDispatch **ppid)
@@ -341,4 +318,8 @@
return E_NOTIMPL;
}
-
+HRESULT WINAPI CShell_Constructor(REFIID riid, LPVOID * ppvOut)
+{
+ return ShellObjectCreatorInit<CShell>(riid, ppvOut);
+}
+
Modified: trunk/reactos/dll/win32/shell32/CShell.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CShell.h…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CShell.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/CShell.h [iso-8859-1] Mon Apr 11 18:28:31 2016
@@ -26,7 +26,7 @@
class CShell:
public CComCoClass<CShell, &CLSID_Shell>,
public CComObjectRootEx<CComMultiThreadModelNoCS>,
- public IShellDispatch4,
+ public IDispatchImpl<IShellDispatch4, &IID_IShellDispatch4>,
public IObjectSafety,
public IObjectWithSite
{
@@ -36,11 +36,7 @@
CShell();
~CShell();
- // *** IDispatch methods ***
- virtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount(UINT *pctinfo);
- virtual HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo
**ppTInfo);
- virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames,
UINT cNames, LCID lcid, DISPID *rgDispId);
- virtual HRESULT STDMETHODCALLTYPE Invoke(DISPID dispIdMember, REFIID riid, LCID lcid,
WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT
*puArgErr);
+ HRESULT Initialize();
// *** IShellDispatch methods ***
virtual HRESULT STDMETHODCALLTYPE get_Application(IDispatch **ppid);
Modified: trunk/reactos/dll/win32/shell32/wine/shell32_main.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/wine/she…
==============================================================================
--- trunk/reactos/dll/win32/shell32/wine/shell32_main.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/wine/shell32_main.h [iso-8859-1] Mon Apr 11 18:28:31
2016
@@ -72,6 +72,7 @@
HRESULT WINAPI IShellView_Constructor(IShellFolder *pFolder, IShellView **newView);
HRESULT WINAPI CDefView_Constructor(IShellFolder *pFolder, REFIID riid, LPVOID *
ppvOut);
HRESULT WINAPI CDefViewDual_Constructor(REFIID riid, LPVOID * ppvOut);
+HRESULT WINAPI CShell_Constructor(REFIID riid, LPVOID * ppvOut);
HRESULT WINAPI IShellLink_ConstructFromFile(IUnknown * pUnkOuter, REFIID riid,
LPCITEMIDLIST pidl, LPVOID * ppv);
HRESULT WINAPI IFileSystemBindData_Constructor(const WIN32_FIND_DATAW *pfd, LPBC *ppV);
Modified: trunk/rostests/winetests/shell32/shelldispatch.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shell32/shelldi…
==============================================================================
--- trunk/rostests/winetests/shell32/shelldispatch.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/shell32/shelldispatch.c [iso-8859-1] Mon Apr 11 18:28:31
2016
@@ -880,17 +880,8 @@
init_function_pointers();
test_namespace();
test_service();
-#ifdef __REACTOS__
- if (!winetest_interactive)
- skip("ROSTESTS-209: Skipping test_ShellFolderViewDual() and
test_ShellWindows().\n");
- else
- {
-#endif
test_ShellFolderViewDual();
test_ShellWindows();
-#ifdef __REACTOS__
- }
-#endif
test_ParseName();
test_Verbs();