Author: mjansen
Date: Sun Apr 10 12:05:06 2016
New Revision: 71138
URL:
http://svn.reactos.org/svn/reactos?rev=71138&view=rev
Log:
[SHELL32]
- Stub IShellFolderViewDual2
ROSTESTS-209 #comment CDefViewDual.patch committed.
Added:
trunk/reactos/dll/win32/shell32/CDefViewDual.cpp (with props)
Modified:
trunk/reactos/dll/win32/shell32/CDefView.cpp
trunk/reactos/dll/win32/shell32/CMakeLists.txt
trunk/reactos/dll/win32/shell32/shell32.cpp
trunk/reactos/dll/win32/shell32/wine/shell32_main.h
Modified: trunk/reactos/dll/win32/shell32/CDefView.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CDefView…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CDefView.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/CDefView.cpp [iso-8859-1] Sun Apr 10 12:05:06 2016
@@ -80,6 +80,7 @@
CComPtr<IShellFolder2> m_pSF2Parent;
CComPtr<IShellBrowser> m_pShellBrowser;
CComPtr<ICommDlgBrowser> m_pCommDlgBrowser;
+ CComPtr<IShellFolderViewDual> m_pShellFolderViewDual;
CListView m_ListView;
HWND m_hWndParent;
FOLDERSETTINGS m_FolderSettings;
@@ -2302,6 +2303,12 @@
return hr;
*ppvOut = pcm;
}
+ else if (IsEqualIID(riid, IID_IDispatch))
+ {
+ if (m_pShellFolderViewDual == NULL)
+ hr = CDefViewDual_Constructor(riid,
(LPVOID*)&m_pShellFolderViewDual);
+ hr = m_pShellFolderViewDual->QueryInterface(riid, ppvOut);
+ }
break;
case SVGIO_SELECTION:
Added: 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 (added)
+++ trunk/reactos/dll/win32/shell32/CDefViewDual.cpp [iso-8859-1] Sun Apr 10 12:05:06
2016
@@ -0,0 +1,143 @@
+/*
+ * ShellFolderViewDual
+ *
+ * Copyright 2016 Mark Jansen
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ *
+ */
+
+#include "precomp.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(shell);
+
+class CDefViewDual :
+ public CComObjectRootEx<CComMultiThreadModelNoCS>,
+ public IDispatchImpl<IShellFolderViewDual2, &IID_IShellFolderViewDual2>
+{
+ public:
+ CDefViewDual()
+ {
+ }
+
+ ~CDefViewDual()
+ {
+ }
+
+ HRESULT STDMETHODCALLTYPE Initialize()
+ {
+ // Nothing to do for now..
+ return S_OK;
+ }
+
+ // *** IShellFolderViewDual methods ***
+ 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;
+ }
+
+ virtual HRESULT STDMETHODCALLTYPE get_Parent(IDispatch **parent) override
+ {
+ if (!parent) return E_INVALIDARG;
+ *parent = NULL;
+ FIXME("CDefViewDual::get_Parent is UNIMPLEMENTED (%p, %p)\n", this,
parent);
+ return E_NOTIMPL;
+ }
+
+ virtual HRESULT STDMETHODCALLTYPE get_Folder(Folder **folder) override
+ {
+ if (!folder) return E_INVALIDARG;
+ *folder = NULL;
+ FIXME("CDefViewDual::get_Folder is UNIMPLEMENTED (%p, %p)\n", this,
folder);
+ return E_NOTIMPL;
+ }
+
+ virtual HRESULT STDMETHODCALLTYPE SelectedItems(FolderItems **items) override
+ {
+ if (!items) return E_INVALIDARG;
+ *items = NULL;
+ FIXME("CDefViewDual::SelectedItems is UNIMPLEMENTED (%p, %p)\n",
this, items);
+ return E_NOTIMPL;
+ }
+
+ virtual HRESULT STDMETHODCALLTYPE get_FocusedItem(FolderItem **item) override
+ {
+ if (!item) return E_INVALIDARG;
+ *item = NULL;
+ FIXME("CDefViewDual::get_FocusedItem is UNIMPLEMENTED (%p, %p)\n",
this, item);
+ return E_NOTIMPL;
+ }
+
+ virtual HRESULT STDMETHODCALLTYPE SelectItem(VARIANT *item, int flags) override
+ {
+ FIXME("CDefViewDual::SelectItem is UNIMPLEMENTED (%p, %p, %i)\n",
this, item, flags);
+ return E_NOTIMPL;
+ }
+
+ virtual HRESULT STDMETHODCALLTYPE PopupItemMenu(FolderItem *item, VARIANT vx,
VARIANT vy, BSTR *command) override
+ {
+ FIXME("CDefViewDual::PopupItemMenu is UNIMPLEMENTED (%p, %p, %s, %s,
%p)\n", this, item, wine_dbgstr_variant(&vx), wine_dbgstr_variant(&vy),
command);
+ return E_NOTIMPL;
+ }
+
+ virtual HRESULT STDMETHODCALLTYPE get_Script(IDispatch **script) override
+ {
+ FIXME("CDefViewDual::get_Script is UNIMPLEMENTED (%p, %p)\n", this,
script);
+ return E_NOTIMPL;
+ }
+
+ virtual HRESULT STDMETHODCALLTYPE get_ViewOptions(long *options) override
+ {
+ FIXME("CDefViewDual::get_ViewOptions is UNIMPLEMENTED (%p, %p)\n",
this, options);
+ return E_NOTIMPL;
+ }
+
+ // *** IShellFolderViewDual2 methods ***
+ virtual HRESULT STDMETHODCALLTYPE get_CurrentViewMode(UINT *mode) override
+ {
+ FIXME("CDefViewDual::get_CurrentViewMode is UNIMPLEMENTED (%p,
%p)\n", this, mode);
+ return E_NOTIMPL;
+ }
+
+ virtual HRESULT STDMETHODCALLTYPE put_CurrentViewMode(UINT mode) override
+ {
+ FIXME("CDefViewDual::put_CurrentViewMode is UNIMPLEMENTED (%p,
%u)\n", this, mode);
+ return E_NOTIMPL;
+ }
+
+ virtual HRESULT STDMETHODCALLTYPE SelectItemRelative(int relative) override
+ {
+ FIXME("CDefViewDual::SelectItemRelative is UNIMPLEMENTED (%p,
%i)\n", this, relative);
+ return E_NOTIMPL;
+ }
+
+ BEGIN_COM_MAP(CDefViewDual)
+ COM_INTERFACE_ENTRY_IID(IID_IDispatch, IDispatch)
+ COM_INTERFACE_ENTRY_IID(IID_IShellFolderViewDual, IShellFolderViewDual)
+ COM_INTERFACE_ENTRY_IID(IID_IShellFolderViewDual2, IShellFolderViewDual2)
+ END_COM_MAP()
+};
+
+/**********************************************************
+ * CDefViewDual_Constructor
+ */
+
+HRESULT WINAPI CDefViewDual_Constructor(REFIID riid, LPVOID * ppvOut)
+{
+ return ShellObjectCreatorInit<CDefViewDual>(riid, ppvOut);
+}
Propchange: trunk/reactos/dll/win32/shell32/CDefViewDual.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/dll/win32/shell32/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CMakeLis…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/CMakeLists.txt [iso-8859-1] Sun Apr 10 12:05:06 2016
@@ -5,6 +5,11 @@
set_cpp(WITH_RUNTIME)
spec2def(shell32.dll shell32.spec ADD_IMPORTLIB)
+
+if(NOT MSVC)
+ # HACK: this should be enabled globally!
+ add_compile_flags_language("-std=c++11" "CXX")
+endif()
remove_definitions(-D_WIN32_WINNT=0x502)
add_definitions(-D_WIN32_WINNT=0x600)
@@ -53,6 +58,7 @@
shlfolder.cpp
CFileSysBindData.cpp
CDefView.cpp
+ CDefViewDual.cpp
stubs.cpp
systray.cpp
CDefaultContextMenu.cpp
Modified: trunk/reactos/dll/win32/shell32/shell32.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shell32.…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shell32.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shell32.cpp [iso-8859-1] Sun Apr 10 12:05:06 2016
@@ -292,7 +292,7 @@
if (dwReason == DLL_PROCESS_ATTACH)
{
shell32_hInstance = hInstance;
- gModule.Init(ObjectMap, hInstance, NULL);
+ gModule.Init(ObjectMap, hInstance, &LIBID_Shell32);
DisableThreadLibraryCalls (hInstance);
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] Sun Apr 10 12:05:06
2016
@@ -71,6 +71,7 @@
IContextMenu2 * ISvBgCm_Constructor(LPSHELLFOLDER pSFParent, BOOL bDesktop);
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 IShellLink_ConstructFromFile(IUnknown * pUnkOuter, REFIID riid,
LPCITEMIDLIST pidl, LPVOID * ppv);
HRESULT WINAPI IFileSystemBindData_Constructor(const WIN32_FIND_DATAW *pfd, LPBC *ppV);