diff --git a/dlls/shell32/cpanelfolder.c b/dlls/shell32/cpanelfolder.c index 6fc21f980d5..2cd97f2838f 100644 --- a/dlls/shell32/cpanelfolder.c +++ b/dlls/shell32/cpanelfolder.c @@ -471,7 +471,7 @@ static HRESULT WINAPI ISF_ControlPanel_fnBindToObject(IShellFolder2 *iface, LPCI TRACE("(%p)->(pidl=%p,%p,%s,%p)\n", This, pidl, pbcReserved, shdebugstr_guid(riid), ppvOut); - return SHELL32_BindToChild(This->pidlRoot, NULL, pidl, riid, ppvOut); + return SHELL32_BindToChild(This->pidlRoot, &CLSID_ShellFSFolder, NULL, pidl, riid, ppvOut); } /************************************************************************** diff --git a/dlls/shell32/shfldr.h b/dlls/shell32/shfldr.h index 1c10cc2c81d..e6456e1392f 100644 --- a/dlls/shell32/shfldr.h +++ b/dlls/shell32/shfldr.h @@ -50,7 +50,7 @@ HRESULT SHELL32_GetItemAttributes (IShellFolder2 *folder, LPCITEMIDLIST pidl, DW HRESULT SHELL32_GetDisplayNameOfChild (IShellFolder2 * psf, LPCITEMIDLIST pidl, DWORD dwFlags, LPWSTR szOut, DWORD dwOutLen) DECLSPEC_HIDDEN; -HRESULT SHELL32_BindToChild (LPCITEMIDLIST pidlRoot, +HRESULT SHELL32_BindToChild (LPCITEMIDLIST pidlRoot, const CLSID *clsidChild, LPCWSTR pathRoot, LPCITEMIDLIST pidlComplete, REFIID riid, LPVOID * ppvOut) DECLSPEC_HIDDEN; HRESULT SHELL32_CompareIDs(IShellFolder2 *iface, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) DECLSPEC_HIDDEN; diff --git a/dlls/shell32/shfldr_desktop.c b/dlls/shell32/shfldr_desktop.c index 1f1a1c95b7b..33140784f22 100644 --- a/dlls/shell32/shfldr_desktop.c +++ b/dlls/shell32/shfldr_desktop.c @@ -370,7 +370,7 @@ static HRESULT WINAPI ISF_Desktop_fnBindToObject (IShellFolder2 * iface, TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", This, pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); - return SHELL32_BindToChild( This->pidlRoot, This->sPathTarget, pidl, riid, ppvOut ); + return SHELL32_BindToChild( This->pidlRoot, &CLSID_ShellFSFolder, This->sPathTarget, pidl, riid, ppvOut ); } /************************************************************************** diff --git a/dlls/shell32/shfldr_fs.c b/dlls/shell32/shfldr_fs.c index 902910e55bb..812a022c806 100644 --- a/dlls/shell32/shfldr_fs.c +++ b/dlls/shell32/shfldr_fs.c @@ -425,8 +425,7 @@ IShellFolder_fnBindToObject (IShellFolder2 * iface, LPCITEMIDLIST pidl, TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", This, pidl, pbc, shdebugstr_guid (riid), ppvOut); - return SHELL32_BindToChild (This->pidlRoot, This->sPathTarget, pidl, riid, - ppvOut); + return SHELL32_BindToChild (This->pidlRoot, This->pclsid, This->sPathTarget, pidl, riid, ppvOut); } /************************************************************************** diff --git a/dlls/shell32/shfldr_mycomp.c b/dlls/shell32/shfldr_mycomp.c index 91f81a22741..56d08cc87e9 100644 --- a/dlls/shell32/shfldr_mycomp.c +++ b/dlls/shell32/shfldr_mycomp.c @@ -379,7 +379,7 @@ static HRESULT WINAPI ISF_MyComputer_fnBindToObject (IShellFolder2 *iface, TRACE("(%p)->(pidl=%p,%p,%s,%p)\n", This, pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); - return SHELL32_BindToChild (This->pidlRoot, NULL, pidl, riid, ppvOut); + return SHELL32_BindToChild (This->pidlRoot, &CLSID_ShellFSFolder, NULL, pidl, riid, ppvOut); } /************************************************************************** diff --git a/dlls/shell32/shfldr_netplaces.c b/dlls/shell32/shfldr_netplaces.c index e74336544f3..be99b7f5875 100644 --- a/dlls/shell32/shfldr_netplaces.c +++ b/dlls/shell32/shfldr_netplaces.c @@ -264,7 +264,7 @@ static HRESULT WINAPI ISF_NetworkPlaces_fnBindToObject (IShellFolder2 * iface, TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", This, pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); - return SHELL32_BindToChild (This->pidlRoot, NULL, pidl, riid, ppvOut); + return SHELL32_BindToChild (This->pidlRoot, &CLSID_ShellFSFolder, NULL, pidl, riid, ppvOut); } /************************************************************************** diff --git a/dlls/shell32/shlfolder.c b/dlls/shell32/shlfolder.c index f288b7f7ab1..e84733d2676 100644 --- a/dlls/shell32/shlfolder.c +++ b/dlls/shell32/shlfolder.c @@ -260,7 +260,7 @@ static HRESULT SHELL32_CoCreateInitSF (LPCITEMIDLIST pidlRoot, LPCWSTR pathRoot, * This function makes special assumptions on the shell namespace, which * means you probably can't use it for your IShellFolder implementation. */ -HRESULT SHELL32_BindToChild (LPCITEMIDLIST pidlRoot, +HRESULT SHELL32_BindToChild (LPCITEMIDLIST pidlRoot, const CLSID *clsidChild, LPCWSTR pathRoot, LPCITEMIDLIST pidlComplete, REFIID riid, LPVOID * ppvOut) { GUID const *clsid; @@ -285,10 +285,10 @@ HRESULT SHELL32_BindToChild (LPCITEMIDLIST pidlRoot, hr = HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); } else { /* file system folder */ - CLSID clsidFolder = CLSID_ShellFSFolder; + CLSID clsidFolder = *clsidChild; static const WCHAR wszCLSID[] = {'C','L','S','I','D',0}; WCHAR wszCLSIDValue[CHARS_IN_GUID], wszFolderPath[MAX_PATH], *pwszPathTail = wszFolderPath; - + /* see if folder CLSID should be overridden by desktop.ini file */ if (pathRoot) { lstrcpynW(wszFolderPath, pathRoot, MAX_PATH);