Author: gadamopoulos
Date: Wed Sep 2 18:20:40 2015
New Revision: 68916
URL:
http://svn.reactos.org/svn/reactos?rev=68916&view=rev
Log:
[SHELL32] - Remove Reactos only ISFHelper interface that is no longer used.
Removed:
trunk/reactos/dll/win32/shell32/shellfolder.h
Modified:
trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp
trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.h
trunk/reactos/dll/win32/shell32/folders/CFSFolder.cpp
trunk/reactos/dll/win32/shell32/folders/CFSFolder.h
trunk/reactos/dll/win32/shell32/precomp.h
trunk/reactos/dll/win32/shell32/wine/brsfolder.c
Modified: trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
==============================================================================
--- trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp [iso-8859-1] Wed Sep 2
18:20:40 2015
@@ -957,41 +957,6 @@
return S_OK;
}
-HRESULT WINAPI CDesktopFolder::GetUniqueName(LPWSTR pwszName, UINT uLen)
-{
- CComPtr<ISFHelper> psfHelper;
- HRESULT hr = m_DesktopFSFolder->QueryInterface(IID_PPV_ARG(ISFHelper,
&psfHelper));
- if (FAILED(hr))
- return hr;
-
- return psfHelper->GetUniqueName(pwszName, uLen);
-}
-
-HRESULT WINAPI CDesktopFolder::AddFolder(HWND hwnd, LPCWSTR pwszName, LPITEMIDLIST
*ppidlOut)
-{
- CComPtr<ISFHelper> psfHelper;
- HRESULT hr = m_DesktopFSFolder->QueryInterface(IID_PPV_ARG(ISFHelper,
&psfHelper));
- if (FAILED(hr))
- return hr;
-
- return psfHelper->AddFolder(hwnd, pwszName, ppidlOut);
-}
-
-HRESULT WINAPI CDesktopFolder::DeleteItems(UINT cidl, LPCITEMIDLIST *apidl)
-{
- return E_NOTIMPL;
-}
-
-HRESULT WINAPI CDesktopFolder::CopyItems(IShellFolder *pSFFrom, UINT cidl, LPCITEMIDLIST
*apidl, BOOL bCopy)
-{
- CComPtr<ISFHelper> psfHelper;
- HRESULT hr = m_DesktopFSFolder->QueryInterface(IID_PPV_ARG(ISFHelper,
&psfHelper));
- if (FAILED(hr))
- return hr;
-
- return psfHelper->CopyItems(pSFFrom, cidl, apidl, bCopy);
-}
-
HRESULT WINAPI CDesktopFolder::_GetDropTarget(LPCITEMIDLIST pidl, LPVOID *ppvOut) {
HRESULT hr;
Modified: trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
==============================================================================
--- trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.h [iso-8859-1] Wed Sep 2
18:20:40 2015
@@ -27,8 +27,7 @@
public CComCoClass<CDesktopFolder, &CLSID_ShellDesktop>,
public CComObjectRootEx<CComMultiThreadModelNoCS>,
public IShellFolder2,
- public IPersistFolder2,
- public ISFHelper
+ public IPersistFolder2
{
private:
/* both paths are parsible from the desktop */
@@ -75,12 +74,6 @@
// *** IPersistFolder2 methods ***
virtual HRESULT WINAPI GetCurFolder(LPITEMIDLIST * pidl);
- // *** ISFHelper methods ***
- virtual HRESULT WINAPI GetUniqueName(LPWSTR pwszName, UINT uLen);
- virtual HRESULT WINAPI AddFolder(HWND hwnd, LPCWSTR pwszName, LPITEMIDLIST
*ppidlOut);
- virtual HRESULT WINAPI DeleteItems(UINT cidl, LPCITEMIDLIST *apidl);
- virtual HRESULT WINAPI CopyItems(IShellFolder *pSFFrom, UINT cidl, LPCITEMIDLIST
*apidl, BOOL bCopy);
-
DECLARE_REGISTRY_RESOURCEID(IDR_SHELLDESKTOP)
DECLARE_CENTRAL_INSTANCE_NOT_AGGREGATABLE(CDesktopFolder)
@@ -92,7 +85,6 @@
COM_INTERFACE_ENTRY_IID(IID_IPersistFolder, IPersistFolder)
COM_INTERFACE_ENTRY_IID(IID_IPersistFolder2, IPersistFolder2)
COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist)
- COM_INTERFACE_ENTRY_IID(IID_ISFHelper, ISFHelper)
END_COM_MAP()
};
Modified: trunk/reactos/dll/win32/shell32/folders/CFSFolder.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
==============================================================================
--- trunk/reactos/dll/win32/shell32/folders/CFSFolder.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/folders/CFSFolder.cpp [iso-8859-1] Wed Sep 2 18:20:40
2015
@@ -821,108 +821,6 @@
}
/****************************************************************************
- * ISFHelper for IShellFolder implementation
- */
-
-/****************************************************************************
- * CFSFolder::GetUniqueName
- *
- * creates a unique folder name
- */
-
-HRESULT WINAPI CFSFolder::GetUniqueName(LPWSTR pwszName, UINT uLen)
-{
- CComPtr<IEnumIDList> penum;
- HRESULT hr;
- WCHAR wszText[MAX_PATH];
- WCHAR wszNewFolder[25];
- const WCHAR wszFormat[] = L"%s %d";
-
- LoadStringW(shell32_hInstance, IDS_NEWFOLDER, wszNewFolder, _countof(wszNewFolder));
-
- TRACE ("(%p)(%p %u)\n", this, pwszName, uLen);
-
- if (uLen < _countof(wszNewFolder) + 3)
- return E_POINTER;
-
- lstrcpynW (pwszName, wszNewFolder, uLen);
-
- hr = EnumObjects(0, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS | SHCONTF_INCLUDEHIDDEN,
&penum);
- if (penum)
- {
- LPITEMIDLIST pidl;
- DWORD dwFetched;
- int i = 1;
-
-next:
- penum->Reset ();
- while (S_OK == penum->Next(1, &pidl, &dwFetched) &&
dwFetched)
- {
- _ILSimpleGetTextW(pidl, wszText, MAX_PATH);
- if (0 == lstrcmpiW(wszText, pwszName))
- {
- _snwprintf(pwszName, uLen, wszFormat, wszNewFolder, i++);
- if (i > 99)
- {
- hr = E_FAIL;
- break;
- }
- goto next;
- }
- }
- }
- return hr;
-}
-
-/****************************************************************************
- * CFSFolder::AddFolder
- *
- * adds a new folder.
- */
-
-HRESULT WINAPI CFSFolder::AddFolder(HWND hwnd, LPCWSTR pwszName,
- LPITEMIDLIST * ppidlOut)
-{
- WCHAR wszNewDir[MAX_PATH];
- DWORD bRes;
- HRESULT hres = E_FAIL;
-
- TRACE ("(%p)(%s %p)\n", this, debugstr_w(pwszName), ppidlOut);
-
- wszNewDir[0] = 0;
- if (sPathTarget)
- lstrcpynW(wszNewDir, sPathTarget, MAX_PATH);
- PathAppendW(wszNewDir, pwszName);
-
- bRes = CreateDirectoryW(wszNewDir, NULL);
- if (bRes)
- {
- SHChangeNotify(SHCNE_MKDIR, SHCNF_PATHW, wszNewDir, NULL);
-
- hres = S_OK;
-
- if (ppidlOut)
- hres = _ILCreateFromPathW(wszNewDir, ppidlOut);
- }
- else
- {
- WCHAR wszText[128 + MAX_PATH];
- WCHAR wszTempText[128];
- WCHAR wszCaption[256];
-
- /* Cannot Create folder because of permissions */
- LoadStringW(shell32_hInstance, IDS_CREATEFOLDER_DENIED, wszTempText,
- _countof(wszTempText));
- LoadStringW(shell32_hInstance, IDS_CREATEFOLDER_CAPTION, wszCaption,
- _countof(wszCaption));
- swprintf(wszText, wszTempText, wszNewDir);
- MessageBoxW(hwnd, wszText, wszCaption, MB_OK | MB_ICONEXCLAMATION);
- }
-
- return hres;
-}
-
-/****************************************************************************
* BuildPathsList
*
* Builds a list of paths like the one used in SHFileOperation from a table of
@@ -952,70 +850,6 @@
}
*pwszListPos = 0;
return pwszPathsList;
-}
-
-/****************************************************************************
- * CFSFolder::DeleteItems
- *
- * deletes items in folder
- */
-HRESULT WINAPI CFSFolder::DeleteItems(UINT cidl, LPCITEMIDLIST *apidl)
-{
- UINT i;
- SHFILEOPSTRUCTW op;
- WCHAR wszPath[MAX_PATH];
- WCHAR *wszPathsList;
- HRESULT ret;
- WCHAR *wszCurrentPath;
-
- TRACE ("(%p)(%u %p)\n", this, cidl, apidl);
- if (cidl == 0) return S_OK;
-
- if (sPathTarget)
- lstrcpynW(wszPath, sPathTarget, MAX_PATH);
- else
- wszPath[0] = '\0';
- PathAddBackslashW(wszPath);
- wszPathsList = BuildPathsList(wszPath, cidl, apidl);
-
- ZeroMemory(&op, sizeof(op));
- op.hwnd = GetActiveWindow();
- op.wFunc = FO_DELETE;
- op.pFrom = wszPathsList;
- op.fFlags = FOF_ALLOWUNDO;
- if (SHFileOperationW(&op))
- {
- WARN("SHFileOperation failed\n");
- ret = E_FAIL;
- }
- else
- ret = S_OK;
-
- /* we currently need to manually send the notifies */
- wszCurrentPath = wszPathsList;
- for (i = 0; i < cidl; i++)
- {
- LONG wEventId;
-
- if (_ILIsFolder(apidl[i]))
- wEventId = SHCNE_RMDIR;
- else if (_ILIsValue(apidl[i]))
- wEventId = SHCNE_DELETE;
- else
- continue;
-
- /* check if file exists */
- if (GetFileAttributesW(wszCurrentPath) == INVALID_FILE_ATTRIBUTES)
- {
- LPITEMIDLIST pidl = ILCombine(pidlRoot, apidl[i]);
- SHChangeNotify(wEventId, SHCNF_IDLIST, pidl, NULL);
- SHFree(pidl);
- }
-
- wszCurrentPath += wcslen(wszCurrentPath) + 1;
- }
- HeapFree(GetProcessHeap(), 0, wszPathsList);
- return ret;
}
/****************************************************************************
Modified: trunk/reactos/dll/win32/shell32/folders/CFSFolder.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
==============================================================================
--- trunk/reactos/dll/win32/shell32/folders/CFSFolder.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/folders/CFSFolder.h [iso-8859-1] Wed Sep 2 18:20:40
2015
@@ -30,8 +30,7 @@
public CComObjectRootEx<CComMultiThreadModelNoCS>,
public IShellFolder2,
public IPersistFolder3,
- public IDropTarget,
- public ISFHelper
+ public IDropTarget
{
private:
CLSID *pclsid;
@@ -52,6 +51,7 @@
virtual HRESULT WINAPI _GetDropTarget(LPCITEMIDLIST pidl, LPVOID *ppvOut);
virtual HRESULT WINAPI _LoadDynamicDropTargetHandlerForKey(HKEY hRootKey, LPCWSTR
pwcsname, LPVOID *ppvOut);
virtual HRESULT WINAPI _LoadDynamicDropTargetHandler(const CLSID *pclsid, LPCWSTR
pwcsname, LPVOID *ppvOut);
+ virtual HRESULT WINAPI CopyItems(IShellFolder *pSFFrom, UINT cidl, LPCITEMIDLIST
*apidl, BOOL bCopy);
public:
CFSFolder();
@@ -98,12 +98,6 @@
virtual HRESULT WINAPI DragLeave();
virtual HRESULT WINAPI Drop(IDataObject *pDataObject, DWORD dwKeyState, POINTL
pt, DWORD *pdwEffect);
- // ISFHelper
- virtual HRESULT WINAPI GetUniqueName(LPWSTR pwszName, UINT uLen);
- virtual HRESULT WINAPI AddFolder(HWND hwnd, LPCWSTR pwszName, LPITEMIDLIST
*ppidlOut);
- virtual HRESULT WINAPI DeleteItems(UINT cidl, LPCITEMIDLIST *apidl);
- virtual HRESULT WINAPI CopyItems(IShellFolder *pSFFrom, UINT cidl, LPCITEMIDLIST
*apidl, BOOL bCopy);
-
DECLARE_REGISTRY_RESOURCEID(IDR_SHELLFSFOLDER)
DECLARE_NOT_AGGREGATABLE(CFSFolder)
@@ -117,7 +111,6 @@
COM_INTERFACE_ENTRY_IID(IID_IPersistFolder3, IPersistFolder3)
COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist)
COM_INTERFACE_ENTRY_IID(IID_IDropTarget, IDropTarget)
- COM_INTERFACE_ENTRY_IID(IID_ISFHelper, ISFHelper)
END_COM_MAP()
};
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] Wed Sep 2 18:20:40 2015
@@ -45,7 +45,6 @@
#include "wine/cpanel.h"
#include "CEnumIDListBase.h"
#include "shfldr.h"
-#include "shellfolder.h"
#include "CShellItem.h"
#include "CShellLink.h"
#include "CDropTargetHelper.h"
Removed: trunk/reactos/dll/win32/shell32/shellfolder.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shellfol…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shellfolder.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shellfolder.h (removed)
@@ -1,61 +0,0 @@
-/*
- * Defines helper functions to manipulate the contents of an IShellFolder
- *
- * Copyright 2000 Juergen Schmied
- *
- * 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 __WINE_SHELLFOLDER_HELP_H
-#define __WINE_SHELLFOLDER_HELP_H
-
-/*****************************************************************************
- * Predeclare the interfaces
- */
-DEFINE_GUID(IID_ISFHelper, 0x1fe68efbL, 0x1874, 0x9812, 0x56, 0xdc, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00);
-
-/*****************************************************************************
- * ISFHelper interface
- */
-#undef INTERFACE
-
-#define INTERFACE ISFHelper
-DECLARE_INTERFACE_(ISFHelper,IUnknown)
-{
- /*** IUnknown methods ***/
- STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- /*** ISFHelper methods ***/
- STDMETHOD(GetUniqueName)(THIS_ LPWSTR lpName, UINT uLen) PURE;
- STDMETHOD(AddFolder)(THIS_ HWND hwnd, LPCWSTR lpName, LPITEMIDLIST * ppidlOut)
PURE;
- STDMETHOD(DeleteItems)(THIS_ UINT cidl, LPCITEMIDLIST * apidl) PURE;
- STDMETHOD(CopyItems)(THIS_ IShellFolder * pSFFrom, UINT cidl, LPCITEMIDLIST * apidl,
BOOL bCopy) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-/*** IUnknown methods ***/
-#define ISFHelper_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define ISFHelper_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define ISFHelper_Release(p) (p)->lpVtbl->Release(p)
-/*** ISFHelper methods ***/
-#define ISFHelper_GetUniqueName(p,a,b) (p)->lpVtbl->GetUniqueName(p,a,b)
-#define ISFHelper_AddFolder(p,a,b,c) (p)->lpVtbl->AddFolder(p,a,b,c)
-#define ISFHelper_DeleteItems(p,a,b) (p)->lpVtbl->DeleteItems(p,a,b)
-#define ISFHelper_CopyItems(p,a,b,c) (p)->lpVtbl->CopyItems(p,a,b,c)
-#endif
-
-#endif /* __WINE_SHELLFOLDER_HELP_H */
Modified: trunk/reactos/dll/win32/shell32/wine/brsfolder.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/wine/brs…
==============================================================================
--- trunk/reactos/dll/win32/shell32/wine/brsfolder.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/wine/brsfolder.c [iso-8859-1] Wed Sep 2 18:20:40
2015
@@ -38,7 +38,6 @@
#include "pidl.h"
#include "shell32_main.h"
#include "shresdef.h"
-#include "shellfolder.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);