Author: tfaber
Date: Mon Oct 19 15:17:29 2015
New Revision: 69620
URL:
http://svn.reactos.org/svn/reactos?rev=69620&view=rev
Log:
[SHELL32]
- Fix some ITEMIDLIST types
CORE-8441
Modified:
trunk/reactos/dll/win32/shell32/CDefView.cpp
trunk/reactos/dll/win32/shell32/CDefaultContextMenu.cpp
trunk/reactos/dll/win32/shell32/CIDLDataObj.cpp
trunk/reactos/dll/win32/shell32/folders/CControlPanelFolder.cpp
trunk/reactos/dll/win32/shell32/folders/CControlPanelFolder.h
trunk/reactos/dll/win32/shell32/wine/pidl.c
trunk/reactos/dll/win32/shell32/wine/pidl.h
trunk/reactos/dll/win32/shell32/wine/shell32_main.h
trunk/reactos/dll/win32/shell32/wine/shellord.c
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] Mon Oct 19 15:17:29 2015
@@ -92,7 +92,7 @@
BOOL m_menusLoaded;
UINT m_uState;
UINT m_cidl;
- PCUITEMID_CHILD_ARRAY m_apidl;
+ PCUITEMID_CHILD *m_apidl;
PIDLIST_ABSOLUTE m_pidlParent;
LISTVIEW_SORT_INFO m_sortInfo;
ULONG m_hNotify; /* change notification handle */
@@ -1227,7 +1227,7 @@
SHFree(m_apidl);
m_cidl = m_ListView.GetSelectedCount();
- m_apidl = reinterpret_cast<PCUITEMID_CHILD_ARRAY>(SHAlloc(m_cidl *
sizeof(PCUITEMID_CHILD)));
+ m_apidl = static_cast<PCUITEMID_CHILD*>(SHAlloc(m_cidl *
sizeof(PCUITEMID_CHILD)));
if (!m_apidl)
{
m_cidl = 0;
Modified: trunk/reactos/dll/win32/shell32/CDefaultContextMenu.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CDefault…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CDefaultContextMenu.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/CDefaultContextMenu.cpp [iso-8859-1] Mon Oct 19
15:17:29 2015
@@ -1746,10 +1746,10 @@
HRESULT
WINAPI
CDefFolderMenu_Create2(
- LPCITEMIDLIST pidlFolder,
+ PCIDLIST_ABSOLUTE pidlFolder,
HWND hwnd,
UINT cidl,
- LPCITEMIDLIST *apidl,
+ PCUITEMID_CHILD_ARRAY apidl,
IShellFolder *psf,
LPFNDFMCALLBACK lpfn,
UINT nKeys,
Modified: trunk/reactos/dll/win32/shell32/CIDLDataObj.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CIDLData…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CIDLDataObj.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/CIDLDataObj.cpp [iso-8859-1] Mon Oct 19 15:17:29 2015
@@ -147,7 +147,7 @@
{
private:
LPITEMIDLIST pidl;
- LPITEMIDLIST * apidl;
+ PIDLIST_RELATIVE *apidl;
UINT cidl;
DWORD dropeffect;
@@ -160,7 +160,7 @@
public:
CIDLDataObj();
~CIDLDataObj();
- HRESULT WINAPI Initialize(HWND hwndOwner, LPCITEMIDLIST pMyPidl, LPCITEMIDLIST *
apidlx, UINT cidlx);
+ HRESULT WINAPI Initialize(HWND hwndOwner, PCIDLIST_ABSOLUTE pMyPidl,
PCUIDLIST_RELATIVE_ARRAY apidlx, UINT cidlx);
///////////
virtual HRESULT WINAPI GetData(LPFORMATETC pformatetcIn, STGMEDIUM *pmedium);
@@ -204,7 +204,7 @@
ILFree(pidl);
}
-HRESULT WINAPI CIDLDataObj::Initialize(HWND hwndOwner, LPCITEMIDLIST pMyPidl,
LPCITEMIDLIST * apidlx, UINT cidlx)
+HRESULT WINAPI CIDLDataObj::Initialize(HWND hwndOwner, PCIDLIST_ABSOLUTE pMyPidl,
PCUIDLIST_RELATIVE_ARRAY apidlx, UINT cidlx)
{
pidl = ILClone(pMyPidl);
apidl = _ILCopyaPidl(apidlx, cidlx);
@@ -408,7 +408,7 @@
/**************************************************************************
* IDataObject_Constructor
*/
-HRESULT IDataObject_Constructor(HWND hwndOwner, LPCITEMIDLIST pMyPidl, LPCITEMIDLIST *
apidl, UINT cidl, IDataObject **dataObject)
+HRESULT IDataObject_Constructor(HWND hwndOwner, PCIDLIST_ABSOLUTE pMyPidl,
PCUIDLIST_RELATIVE_ARRAY apidl, UINT cidl, IDataObject **dataObject)
{
return ShellObjectCreatorInit<CIDLDataObj>(hwndOwner, pMyPidl, apidl, cidl,
IID_IDataObject, dataObject);
}
@@ -418,7 +418,7 @@
*
*/
-HRESULT WINAPI SHCreateDataObject(LPCITEMIDLIST pidlFolder, UINT cidl, LPCITEMIDLIST*
apidl, IDataObject *pdtInner, REFIID riid, void **ppv)
+HRESULT WINAPI SHCreateDataObject(PCIDLIST_ABSOLUTE pidlFolder, UINT cidl,
PCUITEMID_CHILD_ARRAY apidl, IDataObject *pdtInner, REFIID riid, void **ppv)
{
if (IsEqualIID(riid, IID_IDataObject))
{
Modified: trunk/reactos/dll/win32/shell32/folders/CControlPanelFolder.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
==============================================================================
--- trunk/reactos/dll/win32/shell32/folders/CControlPanelFolder.cpp [iso-8859-1]
(original)
+++ trunk/reactos/dll/win32/shell32/folders/CControlPanelFolder.cpp [iso-8859-1] Mon Oct
19 15:17:29 2015
@@ -673,7 +673,7 @@
HRESULT WINAPI CCPLItemMenu::Initialize(UINT cidl, PCUITEMID_CHILD_ARRAY apidl)
{
m_cidl = cidl;
- m_apidl = const_cast<PCUITEMID_CHILD_ARRAY>(_ILCopyaPidl(apidl, m_cidl));
+ m_apidl = _ILCopyaPidl(apidl, m_cidl);
if (m_cidl && !m_apidl)
return E_OUTOFMEMORY;
@@ -682,7 +682,7 @@
CCPLItemMenu::~CCPLItemMenu()
{
- _ILFreeaPidl(const_cast<PITEMID_CHILD *>(m_apidl), m_cidl);
+ _ILFreeaPidl(m_apidl, m_cidl);
}
HRESULT WINAPI CCPLItemMenu::QueryContextMenu(
Modified: trunk/reactos/dll/win32/shell32/folders/CControlPanelFolder.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
==============================================================================
--- trunk/reactos/dll/win32/shell32/folders/CControlPanelFolder.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/folders/CControlPanelFolder.h [iso-8859-1] Mon Oct 19
15:17:29 2015
@@ -89,7 +89,7 @@
public IContextMenu2
{
private:
- LPCITEMIDLIST *m_apidl;
+ PITEMID_CHILD *m_apidl;
UINT m_cidl;
public:
Modified: trunk/reactos/dll/win32/shell32/wine/pidl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/wine/pid…
==============================================================================
--- trunk/reactos/dll/win32/shell32/wine/pidl.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/wine/pidl.c [iso-8859-1] Mon Oct 19 15:17:29 2015
@@ -2597,15 +2597,15 @@
*
* copies an aPidl struct
*/
-LPITEMIDLIST* _ILCopyaPidl(const LPCITEMIDLIST * apidlsrc, UINT cidl)
+PITEMID_CHILD* _ILCopyaPidl(PCUITEMID_CHILD_ARRAY apidlsrc, UINT cidl)
{
UINT i;
- LPITEMIDLIST *apidldest;
+ PITEMID_CHILD *apidldest;
if (!apidlsrc)
return NULL;
- apidldest = SHAlloc(cidl * sizeof(LPITEMIDLIST));
+ apidldest = SHAlloc(cidl * sizeof(PITEMID_CHILD));
for (i = 0; i < cidl; i++)
apidldest[i] = ILClone(apidlsrc[i]);
Modified: trunk/reactos/dll/win32/shell32/wine/pidl.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/wine/pid…
==============================================================================
--- trunk/reactos/dll/win32/shell32/wine/pidl.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/wine/pidl.h [iso-8859-1] Mon Oct 19 15:17:29 2015
@@ -306,7 +306,7 @@
* aPidl helper
*/
void _ILFreeaPidl(LPITEMIDLIST * apidl, UINT cidl) DECLSPEC_HIDDEN;
-LPITEMIDLIST * _ILCopyaPidl(const LPCITEMIDLIST * apidlsrc, UINT cidl) DECLSPEC_HIDDEN;
+PITEMID_CHILD* _ILCopyaPidl(PCUITEMID_CHILD_ARRAY apidlsrc, UINT cidl) DECLSPEC_HIDDEN;
LPITEMIDLIST * _ILCopyCidaToaPidl(LPITEMIDLIST* pidl, const CIDA * cida)
DECLSPEC_HIDDEN;
BOOL ILGetDisplayNameExW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPWSTR path, DWORD type)
DECLSPEC_HIDDEN;
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 Oct 19 15:17:29
2015
@@ -61,7 +61,7 @@
/****************************************************************************
* Class constructors
*/
-HRESULT IDataObject_Constructor(HWND hwndOwner, LPCITEMIDLIST pMyPidl, LPCITEMIDLIST *
apidl, UINT cidl, IDataObject **dataObject);
+HRESULT IDataObject_Constructor(HWND hwndOwner, LPCITEMIDLIST pMyPidl,
PCUITEMID_CHILD_ARRAY apidl, UINT cidl, IDataObject **dataObject);
HRESULT IEnumFORMATETC_Constructor(UINT cfmt, const FORMATETC afmt[], IEnumFORMATETC
**enumerator);
LPCLASSFACTORY IClassFactory_Constructor(REFCLSID);
Modified: trunk/reactos/dll/win32/shell32/wine/shellord.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/wine/she…
==============================================================================
--- trunk/reactos/dll/win32/shell32/wine/shellord.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/wine/shellord.c [iso-8859-1] Mon Oct 19 15:17:29 2015
@@ -1837,9 +1837,9 @@
* Create IDataObject from PIDLs??
*/
HRESULT WINAPI CIDLData_CreateFromIDArray(
- LPCITEMIDLIST pidlFolder,
+ PCIDLIST_ABSOLUTE pidlFolder,
UINT cpidlFiles,
- LPCITEMIDLIST *lppidlFiles,
+ PCUIDLIST_RELATIVE_ARRAY lppidlFiles,
LPDATAOBJECT *ppdataObject)
{
UINT i;