mirror of
https://github.com/reactos/reactos.git
synced 2024-11-03 21:34:00 +00:00
call QueryInterface for Desktop in SHBindToParent()
svn path=/trunk/; revision=7482
This commit is contained in:
parent
7cf14adb77
commit
409b6b7682
1 changed files with 13 additions and 3 deletions
|
@ -1513,10 +1513,20 @@ HRESULT WINAPI SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppv, LPCI
|
||||||
|
|
||||||
if (_ILIsPidlSimple(pidl))
|
if (_ILIsPidlSimple(pidl))
|
||||||
{
|
{
|
||||||
|
IShellFolder* desktop;
|
||||||
|
|
||||||
/* we are on desktop level */
|
/* we are on desktop level */
|
||||||
if (ppidlLast)
|
hr = SHGetDesktopFolder(&desktop);
|
||||||
*ppidlLast = ILClone(pidl);
|
|
||||||
hr = SHGetDesktopFolder((IShellFolder**)ppv);
|
if (SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
hr = IShellFolder_QueryInterface(desktop, riid, ppv);
|
||||||
|
|
||||||
|
if (SUCCEEDED(hr) && ppidlLast)
|
||||||
|
*ppidlLast = ILClone(pidl);
|
||||||
|
|
||||||
|
IShellFolder_Release(desktop);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue