Author: mjansen
Date: Tue May 31 17:40:44 2016
New Revision: 71476
URL:
http://svn.reactos.org/svn/reactos?rev=71476&view=rev
Log:
[SHELL32] Rename CShell to CShellDispatch CORE-6892
Added:
trunk/reactos/dll/win32/shell32/CShellDispatch.cpp (with props)
trunk/reactos/dll/win32/shell32/CShellDispatch.h (with props)
Removed:
trunk/reactos/dll/win32/shell32/CShell.cpp
trunk/reactos/dll/win32/shell32/CShell.h
Modified:
trunk/reactos/dll/win32/shell32/CDefViewDual.cpp
trunk/reactos/dll/win32/shell32/CMakeLists.txt
trunk/reactos/dll/win32/shell32/precomp.h
trunk/reactos/dll/win32/shell32/shell32.cpp
trunk/reactos/dll/win32/shell32/wine/shell32_main.h
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] Tue May 31 17:40:44
2016
@@ -47,7 +47,7 @@
{
if (!app) return E_INVALIDARG;
- return CShell_Constructor(IID_IDispatch, (LPVOID*)app);
+ return CShellDispatch_Constructor(IID_IDispatch, (LPVOID*)app);
}
virtual HRESULT STDMETHODCALLTYPE get_Parent(IDispatch **parent) override
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] Tue May 31 17:40:44 2016
@@ -65,7 +65,7 @@
CDefaultContextMenu.cpp
COpenWithMenu.cpp
CNewMenu.cpp
- CShell.cpp
+ CShellDispatch.cpp
CFolder.cpp
CFolderItems.cpp
CFolderItemVerbs.cpp
Removed: 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 (removed)
@@ -1,325 +0,0 @@
-/*
- * IShellDispatch implementation
- *
- * Copyright 2015 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);
-
-
-CShell::CShell()
-{
-}
-
-CShell::~CShell()
-{
-}
-
-HRESULT CShell::Initialize()
-{
- return S_OK;
-}
-
-// *** IShellDispatch methods ***
-HRESULT STDMETHODCALLTYPE CShell::get_Application(IDispatch **ppid)
-{
- TRACE("(%p, %p)\n", this, ppid);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::get_Parent(IDispatch **ppid)
-{
- TRACE("(%p, %p)\n", this, ppid);
- return E_NOTIMPL;
-}
-
-HRESULT VariantToIdlist(VARIANT* var, LPITEMIDLIST* idlist)
-{
- HRESULT hr = S_FALSE;
- if(V_VT(var) == VT_I4)
- {
- hr = SHGetSpecialFolderLocation(NULL, V_I4(var), idlist);
- }
- else if(V_VT(var) == VT_BSTR)
- {
- hr = SHILCreateFromPathW(V_BSTR(var), idlist, NULL);
- }
- return hr;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::NameSpace(VARIANT vDir, Folder **ppsdf)
-{
- TRACE("(%p, %s, %p)\n", this, debugstr_variant(&vDir), ppsdf);
- if (!ppsdf)
- return E_POINTER;
- *ppsdf = NULL;
- LPITEMIDLIST idlist = NULL;
- HRESULT hr = VariantToIdlist(&vDir, &idlist);
- if (!SUCCEEDED(hr) || !idlist)
- return S_FALSE;
- CFolder* fld = new CComObject<CFolder>();
- fld->Init(idlist);
- *ppsdf = fld;
- fld->AddRef();
- return hr;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::BrowseForFolder(LONG Hwnd, BSTR Title, LONG Options,
VARIANT RootFolder, Folder **ppsdf)
-{
- TRACE("(%p, %lu, %ls, %lu, %s, %p)\n", this, Hwnd, Title, Options,
debugstr_variant(&RootFolder), ppsdf);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::Windows(IDispatch **ppid)
-{
- TRACE("(%p, %p)\n", this, ppid);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::Open(VARIANT vDir)
-{
- TRACE("(%p, %s)\n", this, debugstr_variant(&vDir));
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::Explore(VARIANT vDir)
-{
- TRACE("(%p, %s)\n", this, debugstr_variant(&vDir));
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::MinimizeAll()
-{
- TRACE("(%p)\n", this);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::UndoMinimizeALL()
-{
- TRACE("(%p)\n", this);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::FileRun()
-{
- TRACE("(%p)\n", this);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::CascadeWindows()
-{
- TRACE("(%p)\n", this);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::TileVertically()
-{
- TRACE("(%p)\n", this);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::TileHorizontally()
-{
- TRACE("(%p)\n", this);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::ShutdownWindows()
-{
- TRACE("(%p)\n", this);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::Suspend()
-{
- TRACE("(%p)\n", this);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::EjectPC()
-{
- TRACE("(%p)\n", this);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::SetTime()
-{
- TRACE("(%p)\n", this);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::TrayProperties()
-{
- TRACE("(%p)\n", this);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::Help()
-{
- TRACE("(%p)\n", this);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::FindFiles()
-{
- TRACE("(%p)\n", this);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::FindComputer()
-{
- TRACE("(%p)\n", this);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::RefreshMenu()
-{
- TRACE("(%p)\n", this);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::ControlPanelItem(BSTR szDir)
-{
- TRACE("(%p, %ls)\n", this, szDir);
- return E_NOTIMPL;
-}
-
-
-// *** IShellDispatch2 methods ***
-HRESULT STDMETHODCALLTYPE CShell::IsRestricted(BSTR group, BSTR restriction, LONG
*value)
-{
- TRACE("(%p, %ls, %ls, %p)\n", this, group, restriction, value);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::ShellExecute(BSTR file, VARIANT args, VARIANT dir,
VARIANT op, VARIANT show)
-{
- TRACE("(%p, %ls, %s, %s, %s, %s)\n", this, file,
debugstr_variant(&args), debugstr_variant(&dir), debugstr_variant(&op),
debugstr_variant(&show));
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::FindPrinter(BSTR name, BSTR location, BSTR model)
-{
- TRACE("(%p, %ls, %ls, %ls)\n", this, name, location, model);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::GetSystemInformation(BSTR name, VARIANT *ret)
-{
- TRACE("(%p, %ls, %p)\n", this, name, ret);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::ServiceStart(BSTR service, VARIANT persistent, VARIANT
*ret)
-{
- TRACE("(%p, %ls, %s, %p)\n", this, service,
wine_dbgstr_variant(&persistent), ret);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::ServiceStop(BSTR service, VARIANT persistent, VARIANT
*ret)
-{
- TRACE("(%p, %ls, %s, %p)\n", this, service,
wine_dbgstr_variant(&persistent), ret);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::IsServiceRunning(BSTR service, VARIANT *running)
-{
- TRACE("(%p, %ls, %p)\n", this, service, running);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::CanStartStopService(BSTR service, VARIANT *ret)
-{
- TRACE("(%p, %ls, %p)\n", this, service, ret);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::ShowBrowserBar(BSTR clsid, VARIANT show, VARIANT *ret)
-{
- TRACE("(%p, %ls, %s, %p)\n", this, clsid, wine_dbgstr_variant(&show),
ret);
- return E_NOTIMPL;
-}
-
-
-// *** IShellDispatch3 methods ***
-HRESULT STDMETHODCALLTYPE CShell::AddToRecent(VARIANT file, BSTR category)
-{
- TRACE("(%p, %s, %ls)\n", this, wine_dbgstr_variant(&file), category);
- return E_NOTIMPL;
-}
-
-
-// *** IShellDispatch4 methods ***
-HRESULT STDMETHODCALLTYPE CShell::WindowsSecurity()
-{
- TRACE("(%p)\n", this);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::ToggleDesktop()
-{
- TRACE("(%p)\n", this);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::ExplorerPolicy(BSTR policy, VARIANT *value)
-{
- TRACE("(%p, %ls, %p)\n", this, policy, value);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::GetSetting(LONG setting, VARIANT_BOOL *result)
-{
- TRACE("(%p, %lu, %p)\n", this, setting, result);
- return E_NOTIMPL;
-}
-
-
-// *** IObjectSafety methods ***
-HRESULT STDMETHODCALLTYPE CShell::GetInterfaceSafetyOptions(REFIID riid, DWORD
*pdwSupportedOptions, DWORD *pdwEnabledOptions)
-{
- TRACE("(%p, %s, %p, %p)\n", this, wine_dbgstr_guid(&riid),
pdwSupportedOptions, pdwEnabledOptions);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::SetInterfaceSafetyOptions(REFIID riid, DWORD
dwOptionSetMask, DWORD dwEnabledOptions)
-{
- TRACE("(%p, %s, %lu, %lu)\n", this, wine_dbgstr_guid(&riid),
dwOptionSetMask, dwEnabledOptions);
- return E_NOTIMPL;
-}
-
-
-// *** IObjectWithSite methods ***
-HRESULT STDMETHODCALLTYPE CShell::SetSite(IUnknown *pUnkSite)
-{
- TRACE("(%p, %p)\n", this, pUnkSite);
- return E_NOTIMPL;
-}
-
-HRESULT STDMETHODCALLTYPE CShell::GetSite(REFIID riid, PVOID *ppvSite)
-{
- TRACE("(%p, %s, %p)\n", this, wine_dbgstr_guid(&riid), ppvSite);
- return E_NOTIMPL;
-}
-
-HRESULT WINAPI CShell_Constructor(REFIID riid, LPVOID * ppvOut)
-{
- return ShellObjectCreatorInit<CShell>(riid, ppvOut);
-}
-
Removed: 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 (removed)
@@ -1,111 +0,0 @@
-/*
- * IShellDispatch implementation
- *
- * Copyright 2015 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
- */
-
-#ifndef _SHELL_H_
-#define _SHELL_H_
-
-#undef ShellExecute
-
-class CShell:
- public CComCoClass<CShell, &CLSID_Shell>,
- public CComObjectRootEx<CComMultiThreadModelNoCS>,
- public IDispatchImpl<IShellDispatch4, &IID_IShellDispatch4>,
- public IObjectSafety,
- public IObjectWithSite
-{
-private:
-
-public:
- CShell();
- ~CShell();
-
- HRESULT Initialize();
-
- // *** IShellDispatch methods ***
- virtual HRESULT STDMETHODCALLTYPE get_Application(IDispatch **ppid);
- virtual HRESULT STDMETHODCALLTYPE get_Parent(IDispatch **ppid);
- virtual HRESULT STDMETHODCALLTYPE NameSpace(VARIANT vDir, Folder **ppsdf);
- virtual HRESULT STDMETHODCALLTYPE BrowseForFolder(LONG Hwnd, BSTR Title, LONG
Options, VARIANT RootFolder, Folder **ppsdf);
- virtual HRESULT STDMETHODCALLTYPE Windows(IDispatch **ppid);
- virtual HRESULT STDMETHODCALLTYPE Open(VARIANT vDir);
- virtual HRESULT STDMETHODCALLTYPE Explore(VARIANT vDir);
- virtual HRESULT STDMETHODCALLTYPE MinimizeAll();
- virtual HRESULT STDMETHODCALLTYPE UndoMinimizeALL();
- virtual HRESULT STDMETHODCALLTYPE FileRun();
- virtual HRESULT STDMETHODCALLTYPE CascadeWindows();
- virtual HRESULT STDMETHODCALLTYPE TileVertically();
- virtual HRESULT STDMETHODCALLTYPE TileHorizontally();
- virtual HRESULT STDMETHODCALLTYPE ShutdownWindows();
- virtual HRESULT STDMETHODCALLTYPE Suspend();
- virtual HRESULT STDMETHODCALLTYPE EjectPC();
- virtual HRESULT STDMETHODCALLTYPE SetTime();
- virtual HRESULT STDMETHODCALLTYPE TrayProperties();
- virtual HRESULT STDMETHODCALLTYPE Help();
- virtual HRESULT STDMETHODCALLTYPE FindFiles();
- virtual HRESULT STDMETHODCALLTYPE FindComputer();
- virtual HRESULT STDMETHODCALLTYPE RefreshMenu();
- virtual HRESULT STDMETHODCALLTYPE ControlPanelItem(BSTR szDir);
-
- // *** IShellDispatch2 methods ***
- virtual HRESULT STDMETHODCALLTYPE IsRestricted(BSTR group, BSTR restriction, LONG
*value);
- virtual HRESULT STDMETHODCALLTYPE ShellExecute(BSTR file, VARIANT args, VARIANT dir,
VARIANT op, VARIANT show);
- virtual HRESULT STDMETHODCALLTYPE FindPrinter(BSTR name, BSTR location, BSTR model);
- virtual HRESULT STDMETHODCALLTYPE GetSystemInformation(BSTR name, VARIANT *ret);
- virtual HRESULT STDMETHODCALLTYPE ServiceStart(BSTR service, VARIANT persistent,
VARIANT *ret);
- virtual HRESULT STDMETHODCALLTYPE ServiceStop(BSTR service, VARIANT persistent,
VARIANT *ret);
- virtual HRESULT STDMETHODCALLTYPE IsServiceRunning(BSTR service, VARIANT *running);
- virtual HRESULT STDMETHODCALLTYPE CanStartStopService(BSTR service, VARIANT *ret);
- virtual HRESULT STDMETHODCALLTYPE ShowBrowserBar(BSTR clsid, VARIANT show, VARIANT
*ret);
-
- // *** IShellDispatch3 methods ***
- virtual HRESULT STDMETHODCALLTYPE AddToRecent(VARIANT file, BSTR category);
-
- // *** IShellDispatch4 methods ***
- virtual HRESULT STDMETHODCALLTYPE WindowsSecurity();
- virtual HRESULT STDMETHODCALLTYPE ToggleDesktop();
- virtual HRESULT STDMETHODCALLTYPE ExplorerPolicy(BSTR policy, VARIANT *value);
- virtual HRESULT STDMETHODCALLTYPE GetSetting(LONG setting, VARIANT_BOOL *result);
-
- // *** IObjectSafety methods ***
- virtual HRESULT STDMETHODCALLTYPE GetInterfaceSafetyOptions(REFIID riid, DWORD
*pdwSupportedOptions, DWORD *pdwEnabledOptions);
- virtual HRESULT STDMETHODCALLTYPE SetInterfaceSafetyOptions(REFIID riid, DWORD
dwOptionSetMask, DWORD dwEnabledOptions);
-
- // *** IObjectWithSite methods ***
- virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite);
- virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, PVOID *ppvSite);
-
-
-DECLARE_REGISTRY_RESOURCEID(IDR_SHELL)
-DECLARE_NOT_AGGREGATABLE(CShell)
-
-DECLARE_PROTECT_FINAL_CONSTRUCT()
-
-BEGIN_COM_MAP(CShell)
- COM_INTERFACE_ENTRY_IID(IID_IShellDispatch4, IShellDispatch4)
- COM_INTERFACE_ENTRY_IID(IID_IShellDispatch3, IShellDispatch3)
- COM_INTERFACE_ENTRY_IID(IID_IShellDispatch2, IShellDispatch2)
- COM_INTERFACE_ENTRY_IID(IID_IShellDispatch, IShellDispatch)
- COM_INTERFACE_ENTRY_IID(IID_IDispatch, IDispatch)
- COM_INTERFACE_ENTRY_IID(IID_IObjectSafety, IObjectSafety)
- COM_INTERFACE_ENTRY_IID(IID_IObjectWithSite, IObjectWithSite)
-END_COM_MAP()
-};
-
-#endif /* _SHELL_H_ */
Added: trunk/reactos/dll/win32/shell32/CShellDispatch.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CShellDi…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CShellDispatch.cpp (added)
+++ trunk/reactos/dll/win32/shell32/CShellDispatch.cpp [iso-8859-1] Tue May 31 17:40:44
2016
@@ -0,0 +1,325 @@
+/*
+ * IShellDispatch implementation
+ *
+ * Copyright 2015 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);
+
+
+CShellDispatch::CShellDispatch()
+{
+}
+
+CShellDispatch::~CShellDispatch()
+{
+}
+
+HRESULT CShellDispatch::Initialize()
+{
+ return S_OK;
+}
+
+// *** IShellDispatch methods ***
+HRESULT STDMETHODCALLTYPE CShellDispatch::get_Application(IDispatch **ppid)
+{
+ TRACE("(%p, %p)\n", this, ppid);
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::get_Parent(IDispatch **ppid)
+{
+ TRACE("(%p, %p)\n", this, ppid);
+ return E_NOTIMPL;
+}
+
+HRESULT VariantToIdlist(VARIANT* var, LPITEMIDLIST* idlist)
+{
+ HRESULT hr = S_FALSE;
+ if(V_VT(var) == VT_I4)
+ {
+ hr = SHGetSpecialFolderLocation(NULL, V_I4(var), idlist);
+ }
+ else if(V_VT(var) == VT_BSTR)
+ {
+ hr = SHILCreateFromPathW(V_BSTR(var), idlist, NULL);
+ }
+ return hr;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::NameSpace(VARIANT vDir, Folder **ppsdf)
+{
+ TRACE("(%p, %s, %p)\n", this, debugstr_variant(&vDir), ppsdf);
+ if (!ppsdf)
+ return E_POINTER;
+ *ppsdf = NULL;
+ LPITEMIDLIST idlist = NULL;
+ HRESULT hr = VariantToIdlist(&vDir, &idlist);
+ if (!SUCCEEDED(hr) || !idlist)
+ return S_FALSE;
+ CFolder* fld = new CComObject<CFolder>();
+ fld->Init(idlist);
+ *ppsdf = fld;
+ fld->AddRef();
+ return hr;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::BrowseForFolder(LONG Hwnd, BSTR Title, LONG
Options, VARIANT RootFolder, Folder **ppsdf)
+{
+ TRACE("(%p, %lu, %ls, %lu, %s, %p)\n", this, Hwnd, Title, Options,
debugstr_variant(&RootFolder), ppsdf);
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::Windows(IDispatch **ppid)
+{
+ TRACE("(%p, %p)\n", this, ppid);
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::Open(VARIANT vDir)
+{
+ TRACE("(%p, %s)\n", this, debugstr_variant(&vDir));
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::Explore(VARIANT vDir)
+{
+ TRACE("(%p, %s)\n", this, debugstr_variant(&vDir));
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::MinimizeAll()
+{
+ TRACE("(%p)\n", this);
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::UndoMinimizeALL()
+{
+ TRACE("(%p)\n", this);
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::FileRun()
+{
+ TRACE("(%p)\n", this);
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::CascadeWindows()
+{
+ TRACE("(%p)\n", this);
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::TileVertically()
+{
+ TRACE("(%p)\n", this);
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::TileHorizontally()
+{
+ TRACE("(%p)\n", this);
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::ShutdownWindows()
+{
+ TRACE("(%p)\n", this);
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::Suspend()
+{
+ TRACE("(%p)\n", this);
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::EjectPC()
+{
+ TRACE("(%p)\n", this);
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::SetTime()
+{
+ TRACE("(%p)\n", this);
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::TrayProperties()
+{
+ TRACE("(%p)\n", this);
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::Help()
+{
+ TRACE("(%p)\n", this);
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::FindFiles()
+{
+ TRACE("(%p)\n", this);
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::FindComputer()
+{
+ TRACE("(%p)\n", this);
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::RefreshMenu()
+{
+ TRACE("(%p)\n", this);
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::ControlPanelItem(BSTR szDir)
+{
+ TRACE("(%p, %ls)\n", this, szDir);
+ return E_NOTIMPL;
+}
+
+
+// *** IShellDispatch2 methods ***
+HRESULT STDMETHODCALLTYPE CShellDispatch::IsRestricted(BSTR group, BSTR restriction, LONG
*value)
+{
+ TRACE("(%p, %ls, %ls, %p)\n", this, group, restriction, value);
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::ShellExecute(BSTR file, VARIANT args, VARIANT
dir, VARIANT op, VARIANT show)
+{
+ TRACE("(%p, %ls, %s, %s, %s, %s)\n", this, file,
debugstr_variant(&args), debugstr_variant(&dir), debugstr_variant(&op),
debugstr_variant(&show));
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::FindPrinter(BSTR name, BSTR location, BSTR
model)
+{
+ TRACE("(%p, %ls, %ls, %ls)\n", this, name, location, model);
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::GetSystemInformation(BSTR name, VARIANT *ret)
+{
+ TRACE("(%p, %ls, %p)\n", this, name, ret);
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::ServiceStart(BSTR service, VARIANT persistent,
VARIANT *ret)
+{
+ TRACE("(%p, %ls, %s, %p)\n", this, service,
wine_dbgstr_variant(&persistent), ret);
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::ServiceStop(BSTR service, VARIANT persistent,
VARIANT *ret)
+{
+ TRACE("(%p, %ls, %s, %p)\n", this, service,
wine_dbgstr_variant(&persistent), ret);
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::IsServiceRunning(BSTR service, VARIANT
*running)
+{
+ TRACE("(%p, %ls, %p)\n", this, service, running);
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::CanStartStopService(BSTR service, VARIANT
*ret)
+{
+ TRACE("(%p, %ls, %p)\n", this, service, ret);
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::ShowBrowserBar(BSTR clsid, VARIANT show,
VARIANT *ret)
+{
+ TRACE("(%p, %ls, %s, %p)\n", this, clsid, wine_dbgstr_variant(&show),
ret);
+ return E_NOTIMPL;
+}
+
+
+// *** IShellDispatch3 methods ***
+HRESULT STDMETHODCALLTYPE CShellDispatch::AddToRecent(VARIANT file, BSTR category)
+{
+ TRACE("(%p, %s, %ls)\n", this, wine_dbgstr_variant(&file), category);
+ return E_NOTIMPL;
+}
+
+
+// *** IShellDispatch4 methods ***
+HRESULT STDMETHODCALLTYPE CShellDispatch::WindowsSecurity()
+{
+ TRACE("(%p)\n", this);
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::ToggleDesktop()
+{
+ TRACE("(%p)\n", this);
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::ExplorerPolicy(BSTR policy, VARIANT *value)
+{
+ TRACE("(%p, %ls, %p)\n", this, policy, value);
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::GetSetting(LONG setting, VARIANT_BOOL *result)
+{
+ TRACE("(%p, %lu, %p)\n", this, setting, result);
+ return E_NOTIMPL;
+}
+
+
+// *** IObjectSafety methods ***
+HRESULT STDMETHODCALLTYPE CShellDispatch::GetInterfaceSafetyOptions(REFIID riid, DWORD
*pdwSupportedOptions, DWORD *pdwEnabledOptions)
+{
+ TRACE("(%p, %s, %p, %p)\n", this, wine_dbgstr_guid(&riid),
pdwSupportedOptions, pdwEnabledOptions);
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::SetInterfaceSafetyOptions(REFIID riid, DWORD
dwOptionSetMask, DWORD dwEnabledOptions)
+{
+ TRACE("(%p, %s, %lu, %lu)\n", this, wine_dbgstr_guid(&riid),
dwOptionSetMask, dwEnabledOptions);
+ return E_NOTIMPL;
+}
+
+
+// *** IObjectWithSite methods ***
+HRESULT STDMETHODCALLTYPE CShellDispatch::SetSite(IUnknown *pUnkSite)
+{
+ TRACE("(%p, %p)\n", this, pUnkSite);
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CShellDispatch::GetSite(REFIID riid, PVOID *ppvSite)
+{
+ TRACE("(%p, %s, %p)\n", this, wine_dbgstr_guid(&riid), ppvSite);
+ return E_NOTIMPL;
+}
+
+HRESULT WINAPI CShellDispatch_Constructor(REFIID riid, LPVOID * ppvOut)
+{
+ return ShellObjectCreatorInit<CShellDispatch>(riid, ppvOut);
+}
+
Propchange: trunk/reactos/dll/win32/shell32/CShellDispatch.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/dll/win32/shell32/CShellDispatch.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CShellDi…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CShellDispatch.h (added)
+++ trunk/reactos/dll/win32/shell32/CShellDispatch.h [iso-8859-1] Tue May 31 17:40:44
2016
@@ -0,0 +1,111 @@
+/*
+ * IShellDispatch implementation
+ *
+ * Copyright 2015 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
+ */
+
+#ifndef _SHELLDISPATCH_H_
+#define _SHELLDISPATCH_H_
+
+#undef ShellExecute
+
+class CShellDispatch:
+ public CComCoClass<CShellDispatch, &CLSID_Shell>,
+ public CComObjectRootEx<CComMultiThreadModelNoCS>,
+ public IDispatchImpl<IShellDispatch4, &IID_IShellDispatch4>,
+ public IObjectSafety,
+ public IObjectWithSite
+{
+private:
+
+public:
+ CShellDispatch();
+ ~CShellDispatch();
+
+ HRESULT Initialize();
+
+ // *** IShellDispatch methods ***
+ virtual HRESULT STDMETHODCALLTYPE get_Application(IDispatch **ppid);
+ virtual HRESULT STDMETHODCALLTYPE get_Parent(IDispatch **ppid);
+ virtual HRESULT STDMETHODCALLTYPE NameSpace(VARIANT vDir, Folder **ppsdf);
+ virtual HRESULT STDMETHODCALLTYPE BrowseForFolder(LONG Hwnd, BSTR Title, LONG
Options, VARIANT RootFolder, Folder **ppsdf);
+ virtual HRESULT STDMETHODCALLTYPE Windows(IDispatch **ppid);
+ virtual HRESULT STDMETHODCALLTYPE Open(VARIANT vDir);
+ virtual HRESULT STDMETHODCALLTYPE Explore(VARIANT vDir);
+ virtual HRESULT STDMETHODCALLTYPE MinimizeAll();
+ virtual HRESULT STDMETHODCALLTYPE UndoMinimizeALL();
+ virtual HRESULT STDMETHODCALLTYPE FileRun();
+ virtual HRESULT STDMETHODCALLTYPE CascadeWindows();
+ virtual HRESULT STDMETHODCALLTYPE TileVertically();
+ virtual HRESULT STDMETHODCALLTYPE TileHorizontally();
+ virtual HRESULT STDMETHODCALLTYPE ShutdownWindows();
+ virtual HRESULT STDMETHODCALLTYPE Suspend();
+ virtual HRESULT STDMETHODCALLTYPE EjectPC();
+ virtual HRESULT STDMETHODCALLTYPE SetTime();
+ virtual HRESULT STDMETHODCALLTYPE TrayProperties();
+ virtual HRESULT STDMETHODCALLTYPE Help();
+ virtual HRESULT STDMETHODCALLTYPE FindFiles();
+ virtual HRESULT STDMETHODCALLTYPE FindComputer();
+ virtual HRESULT STDMETHODCALLTYPE RefreshMenu();
+ virtual HRESULT STDMETHODCALLTYPE ControlPanelItem(BSTR szDir);
+
+ // *** IShellDispatch2 methods ***
+ virtual HRESULT STDMETHODCALLTYPE IsRestricted(BSTR group, BSTR restriction, LONG
*value);
+ virtual HRESULT STDMETHODCALLTYPE ShellExecute(BSTR file, VARIANT args, VARIANT dir,
VARIANT op, VARIANT show);
+ virtual HRESULT STDMETHODCALLTYPE FindPrinter(BSTR name, BSTR location, BSTR model);
+ virtual HRESULT STDMETHODCALLTYPE GetSystemInformation(BSTR name, VARIANT *ret);
+ virtual HRESULT STDMETHODCALLTYPE ServiceStart(BSTR service, VARIANT persistent,
VARIANT *ret);
+ virtual HRESULT STDMETHODCALLTYPE ServiceStop(BSTR service, VARIANT persistent,
VARIANT *ret);
+ virtual HRESULT STDMETHODCALLTYPE IsServiceRunning(BSTR service, VARIANT *running);
+ virtual HRESULT STDMETHODCALLTYPE CanStartStopService(BSTR service, VARIANT *ret);
+ virtual HRESULT STDMETHODCALLTYPE ShowBrowserBar(BSTR clsid, VARIANT show, VARIANT
*ret);
+
+ // *** IShellDispatch3 methods ***
+ virtual HRESULT STDMETHODCALLTYPE AddToRecent(VARIANT file, BSTR category);
+
+ // *** IShellDispatch4 methods ***
+ virtual HRESULT STDMETHODCALLTYPE WindowsSecurity();
+ virtual HRESULT STDMETHODCALLTYPE ToggleDesktop();
+ virtual HRESULT STDMETHODCALLTYPE ExplorerPolicy(BSTR policy, VARIANT *value);
+ virtual HRESULT STDMETHODCALLTYPE GetSetting(LONG setting, VARIANT_BOOL *result);
+
+ // *** IObjectSafety methods ***
+ virtual HRESULT STDMETHODCALLTYPE GetInterfaceSafetyOptions(REFIID riid, DWORD
*pdwSupportedOptions, DWORD *pdwEnabledOptions);
+ virtual HRESULT STDMETHODCALLTYPE SetInterfaceSafetyOptions(REFIID riid, DWORD
dwOptionSetMask, DWORD dwEnabledOptions);
+
+ // *** IObjectWithSite methods ***
+ virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite);
+ virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, PVOID *ppvSite);
+
+
+DECLARE_REGISTRY_RESOURCEID(IDR_SHELL)
+DECLARE_NOT_AGGREGATABLE(CShellDispatch)
+
+DECLARE_PROTECT_FINAL_CONSTRUCT()
+
+BEGIN_COM_MAP(CShellDispatch)
+ COM_INTERFACE_ENTRY_IID(IID_IShellDispatch4, IShellDispatch4)
+ COM_INTERFACE_ENTRY_IID(IID_IShellDispatch3, IShellDispatch3)
+ COM_INTERFACE_ENTRY_IID(IID_IShellDispatch2, IShellDispatch2)
+ COM_INTERFACE_ENTRY_IID(IID_IShellDispatch, IShellDispatch)
+ COM_INTERFACE_ENTRY_IID(IID_IDispatch, IDispatch)
+ COM_INTERFACE_ENTRY_IID(IID_IObjectSafety, IObjectSafety)
+ COM_INTERFACE_ENTRY_IID(IID_IObjectWithSite, IObjectWithSite)
+END_COM_MAP()
+};
+
+#endif /* _SHELLDISPATCH_H_ */
Propchange: trunk/reactos/dll/win32/shell32/CShellDispatch.h
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/dll/win32/shell32/precomp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/precomp.…
==============================================================================
--- trunk/reactos/dll/win32/shell32/precomp.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/precomp.h [iso-8859-1] Tue May 31 17:40:44 2016
@@ -53,7 +53,7 @@
#include "CFolderItemVerbs.h"
#include "CFolderItems.h"
#include "CFolder.h"
-#include "CShell.h"
+#include "CShellDispatch.h"
#include "CDropTargetHelper.h"
#include "CFolderOptions.h"
#include "folders/CFSFolder.h"
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] Tue May 31 17:40:44 2016
@@ -196,7 +196,7 @@
OBJECT_ENTRY(CLSID_ShellDesktop, CDesktopFolder)
OBJECT_ENTRY(CLSID_ShellItem, CShellItem)
OBJECT_ENTRY(CLSID_ShellLink, CShellLink)
- OBJECT_ENTRY(CLSID_Shell, CShell)
+ OBJECT_ENTRY(CLSID_Shell, CShellDispatch)
OBJECT_ENTRY(CLSID_DragDropHelper, CDropTargetHelper)
OBJECT_ENTRY(CLSID_ControlPanel, CControlPanelFolder)
OBJECT_ENTRY(CLSID_MyDocuments, CMyDocsFolder)
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] Tue May 31 17:40:44
2016
@@ -72,7 +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 CShellDispatch_Constructor(REFIID riid, LPVOID * ppvOut);
HRESULT WINAPI IShellLink_ConstructFromPath(WCHAR *path, REFIID riid, LPVOID *ppv);
HRESULT WINAPI IShellLink_ConstructFromFile(IShellFolder * psf, LPCITEMIDLIST pidl,
REFIID riid, LPVOID *ppv);