call QueryInterface for Desktop in SHBindToParent()

svn path=/trunk/; revision=7482
This commit is contained in:
Martin Fuchs 2004-01-06 15:53:06 +00:00
parent 7cf14adb77
commit 409b6b7682

View file

@ -1513,10 +1513,20 @@ HRESULT WINAPI SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppv, LPCI
if (_ILIsPidlSimple(pidl))
{
IShellFolder* desktop;
/* we are on desktop level */
if (ppidlLast)
*ppidlLast = ILClone(pidl);
hr = SHGetDesktopFolder((IShellFolder**)ppv);
hr = SHGetDesktopFolder(&desktop);
if (SUCCEEDED(hr))
{
hr = IShellFolder_QueryInterface(desktop, riid, ppv);
if (SUCCEEDED(hr) && ppidlLast)
*ppidlLast = ILClone(pidl);
IShellFolder_Release(desktop);
}
}
else
{