mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +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))
|
||||
{
|
||||
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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue