Commit 89e187d3 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

shell32: Pass an IShellFolder2 to SHELL32_CompareIDs() to avoid casts.

parent febda816
...@@ -499,7 +499,7 @@ static HRESULT WINAPI ISF_ControlPanel_fnCompareIDs(IShellFolder2 *iface, LPARAM ...@@ -499,7 +499,7 @@ static HRESULT WINAPI ISF_ControlPanel_fnCompareIDs(IShellFolder2 *iface, LPARAM
int nReturn; int nReturn;
TRACE("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", This, lParam, pidl1, pidl2); TRACE("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", This, lParam, pidl1, pidl2);
nReturn = SHELL32_CompareIDs((IShellFolder *)&This->IShellFolder2_iface, lParam, pidl1, pidl2); nReturn = SHELL32_CompareIDs(&This->IShellFolder2_iface, lParam, pidl1, pidl2);
TRACE("-- %i\n", nReturn); TRACE("-- %i\n", nReturn);
return nReturn; return nReturn;
} }
......
...@@ -46,7 +46,7 @@ HRESULT SHELL32_GetDisplayNameOfChild (IShellFolder2 * psf, LPCITEMIDLIST pidl, ...@@ -46,7 +46,7 @@ HRESULT SHELL32_GetDisplayNameOfChild (IShellFolder2 * psf, LPCITEMIDLIST pidl,
HRESULT SHELL32_BindToChild (LPCITEMIDLIST pidlRoot, HRESULT SHELL32_BindToChild (LPCITEMIDLIST pidlRoot,
LPCWSTR pathRoot, LPCITEMIDLIST pidlComplete, REFIID riid, LPVOID * ppvOut) DECLSPEC_HIDDEN; LPCWSTR pathRoot, LPCITEMIDLIST pidlComplete, REFIID riid, LPVOID * ppvOut) DECLSPEC_HIDDEN;
HRESULT SHELL32_CompareIDs (IShellFolder * iface, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) DECLSPEC_HIDDEN; HRESULT SHELL32_CompareIDs(IShellFolder2 *iface, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) DECLSPEC_HIDDEN;
LPITEMIDLIST SHELL32_CreatePidlFromBindCtx(IBindCtx *pbc, LPCWSTR path) DECLSPEC_HIDDEN; LPITEMIDLIST SHELL32_CreatePidlFromBindCtx(IBindCtx *pbc, LPCWSTR path) DECLSPEC_HIDDEN;
HRESULT SHELL32_CreateExtensionUIObject(IShellFolder2 *iface, LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppvOut) DECLSPEC_HIDDEN; HRESULT SHELL32_CreateExtensionUIObject(IShellFolder2 *iface, LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppvOut) DECLSPEC_HIDDEN;
......
...@@ -396,11 +396,10 @@ static HRESULT WINAPI ISF_Desktop_fnCompareIDs (IShellFolder2 *iface, ...@@ -396,11 +396,10 @@ static HRESULT WINAPI ISF_Desktop_fnCompareIDs (IShellFolder2 *iface,
LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
{ {
IDesktopFolderImpl *This = impl_from_IShellFolder2(iface); IDesktopFolderImpl *This = impl_from_IShellFolder2(iface);
IShellFolder *shell_folder = (IShellFolder*)iface;
HRESULT hr; HRESULT hr;
TRACE ("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", This, lParam, pidl1, pidl2); TRACE ("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", This, lParam, pidl1, pidl2);
hr = SHELL32_CompareIDs ( shell_folder, lParam, pidl1, pidl2); hr = SHELL32_CompareIDs(iface, lParam, pidl1, pidl2);
TRACE ("-- 0x%08x\n", hr); TRACE ("-- 0x%08x\n", hr);
return hr; return hr;
} }
......
...@@ -503,7 +503,7 @@ IShellFolder_fnCompareIDs (IShellFolder2 * iface, LPARAM lParam, ...@@ -503,7 +503,7 @@ IShellFolder_fnCompareIDs (IShellFolder2 * iface, LPARAM lParam,
int nReturn; int nReturn;
TRACE ("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", This, lParam, pidl1, pidl2); TRACE ("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", This, lParam, pidl1, pidl2);
nReturn = SHELL32_CompareIDs((IShellFolder *)&This->IShellFolder2_iface, lParam, pidl1, pidl2); nReturn = SHELL32_CompareIDs(&This->IShellFolder2_iface, lParam, pidl1, pidl2);
TRACE ("-- %i\n", nReturn); TRACE ("-- %i\n", nReturn);
return nReturn; return nReturn;
} }
......
...@@ -410,7 +410,7 @@ static HRESULT WINAPI ISF_MyComputer_fnCompareIDs (IShellFolder2 *iface, ...@@ -410,7 +410,7 @@ static HRESULT WINAPI ISF_MyComputer_fnCompareIDs (IShellFolder2 *iface,
HRESULT hr; HRESULT hr;
TRACE ("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", This, lParam, pidl1, pidl2); TRACE ("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", This, lParam, pidl1, pidl2);
hr = SHELL32_CompareIDs ((IShellFolder*)&This->IShellFolder2_iface, lParam, pidl1, pidl2); hr = SHELL32_CompareIDs(&This->IShellFolder2_iface, lParam, pidl1, pidl2);
TRACE ("-- 0x%08x\n", hr); TRACE ("-- 0x%08x\n", hr);
return hr; return hr;
} }
......
...@@ -298,7 +298,7 @@ static HRESULT WINAPI ISF_NetworkPlaces_fnCompareIDs (IShellFolder2 * iface, ...@@ -298,7 +298,7 @@ static HRESULT WINAPI ISF_NetworkPlaces_fnCompareIDs (IShellFolder2 * iface,
int nReturn; int nReturn;
TRACE ("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", This, lParam, pidl1, pidl2); TRACE ("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", This, lParam, pidl1, pidl2);
nReturn = SHELL32_CompareIDs ((IShellFolder *)&This->IShellFolder2_iface, lParam, pidl1, pidl2); nReturn = SHELL32_CompareIDs(&This->IShellFolder2_iface, lParam, pidl1, pidl2);
TRACE ("-- %i\n", nReturn); TRACE ("-- %i\n", nReturn);
return nReturn; return nReturn;
} }
......
...@@ -482,16 +482,14 @@ HRESULT SHELL32_GetItemAttributes (IShellFolder * psf, LPCITEMIDLIST pidl, LPDWO ...@@ -482,16 +482,14 @@ HRESULT SHELL32_GetItemAttributes (IShellFolder * psf, LPCITEMIDLIST pidl, LPDWO
/*********************************************************************** /***********************************************************************
* SHELL32_CompareIDs * SHELL32_CompareIDs
*/ */
HRESULT SHELL32_CompareIDs (IShellFolder * iface, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) HRESULT SHELL32_CompareIDs(IShellFolder2 *sf, LPARAM lParam, LPCITEMIDLIST pidl1,
LPCITEMIDLIST pidl2)
{ {
int type1, int type1, type2;
type2;
char szTemp1[MAX_PATH]; char szTemp1[MAX_PATH];
char szTemp2[MAX_PATH]; char szTemp2[MAX_PATH];
HRESULT nReturn; HRESULT nReturn;
LPITEMIDLIST firstpidl, LPITEMIDLIST firstpidl, nextpidl1, nextpidl2;
nextpidl1,
nextpidl2;
IShellFolder *psf; IShellFolder *psf;
/* test for empty pidls */ /* test for empty pidls */
...@@ -539,7 +537,7 @@ HRESULT SHELL32_CompareIDs (IShellFolder * iface, LPARAM lParam, LPCITEMIDLIST p ...@@ -539,7 +537,7 @@ HRESULT SHELL32_CompareIDs (IShellFolder * iface, LPARAM lParam, LPCITEMIDLIST p
} else if (isEmpty2) { } else if (isEmpty2) {
return MAKE_HRESULT( SEVERITY_SUCCESS, 0, 1 ); return MAKE_HRESULT( SEVERITY_SUCCESS, 0, 1 );
/* optimizing end */ /* optimizing end */
} else if (SUCCEEDED (IShellFolder_BindToObject (iface, firstpidl, NULL, &IID_IShellFolder, (LPVOID *) & psf))) { } else if (SUCCEEDED(IShellFolder2_BindToObject(sf, firstpidl, NULL, &IID_IShellFolder, (void **)&psf))) {
nReturn = IShellFolder_CompareIDs (psf, lParam, nextpidl1, nextpidl2); nReturn = IShellFolder_CompareIDs (psf, lParam, nextpidl1, nextpidl2);
IShellFolder_Release (psf); IShellFolder_Release (psf);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment