Author: rharabien
Date: Mon Dec 19 11:47:30 2011
New Revision: 54697
URL:
http://svn.reactos.org/svn/reactos?rev=54697&view=rev
Log:
[SHELL32]
- Properly check if PIDL is folder. Folders doesn't has "Open With" context
menu item anymore.
Modified:
trunk/reactos/dll/win32/shell32/openwithmenu.cpp
Modified: trunk/reactos/dll/win32/shell32/openwithmenu.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/openwith…
==============================================================================
--- trunk/reactos/dll/win32/shell32/openwithmenu.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/openwithmenu.cpp [iso-8859-1] Mon Dec 19 11:47:30
2011
@@ -1011,8 +1011,8 @@
FORMATETC fmt;
HRESULT hr;
LPIDA pida;
- LPCITEMIDLIST pidl_folder;
- LPCITEMIDLIST pidl_child;
+ LPCITEMIDLIST pidlFolder;
+ LPCITEMIDLIST pidlChild;
LPCITEMIDLIST pidl;
DWORD dwType;
LPWSTR pszExt;
@@ -1035,10 +1035,10 @@
pida = (LPIDA)GlobalLock(medium.hGlobal);
ASSERT(pida->cidl == 1);
- pidl_folder = (LPCITEMIDLIST) ((LPBYTE)pida + pida->aoffset[0]);
- pidl_child = (LPCITEMIDLIST) ((LPBYTE)pida + pida->aoffset[1]);
-
- pidl = ILCombine(pidl_folder, pidl_child);
+ pidlFolder = (LPCITEMIDLIST) ((LPBYTE)pida + pida->aoffset[0]);
+ pidlChild = (LPCITEMIDLIST) ((LPBYTE)pida + pida->aoffset[1]);
+
+ pidl = ILCombine(pidlFolder, pidlChild);
GlobalUnlock(medium.hGlobal);
GlobalFree(medium.hGlobal);
@@ -1048,8 +1048,9 @@
ERR("no mem\n");
return E_OUTOFMEMORY;
}
- if (_ILIsDesktop(pidl) || _ILIsMyDocuments(pidl) || _ILIsControlPanel(pidl) ||
_ILIsNetHood(pidl) ||
- _ILIsBitBucket(pidl) || _ILIsDrive(pidl) || _ILIsCPanelStruct(pidl) ||
_ILIsFolder(pidl))
+ if (_ILIsDesktop(pidlChild) || _ILIsMyDocuments(pidlChild) ||
_ILIsControlPanel(pidlChild) ||
+ _ILIsNetHood(pidlChild) || _ILIsBitBucket(pidlChild) || _ILIsDrive(pidlChild) ||
+ _ILIsCPanelStruct(pidlChild) || _ILIsFolder(pidlChild) ||
_ILIsMyComputer(pidlChild))
{
TRACE("pidl is a folder\n");
SHFree((void*)pidl);