shell32: Allow specifying the child folder CLSID in SHELL32_BindToChild().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0a2831a71d
commit
336c37d5f7
|
@ -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);
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue