[SHELL32] Implement support for IID_IDropTarget in CDesktopFolder::GetUIObjectOf...
[reactos.git] / reactos / dll / win32 / shell32 / folders / CDesktopFolder.cpp
index 07678ef..8d7b4eb 100644 (file)
@@ -686,6 +686,15 @@ HRESULT WINAPI CDesktopFolder::GetUIObjectOf(
     {
         hr = m_regFolder->GetUIObjectOf(hwndOwner, cidl, apidl, riid, prgfInOut, &pObj);
     }
+    else if (IsEqualIID (riid, IID_IDropTarget) && (cidl == 1))
+    {
+        CComPtr<IShellFolder> psfChild;
+        hr = this->BindToObject(apidl[0], NULL, IID_PPV_ARG(IShellFolder, &psfChild));
+        if (FAILED_UNEXPECTEDLY(hr))
+            return hr;
+
+        return psfChild->CreateViewObject(NULL, riid, ppvOut);
+    }
     else
         hr = E_NOINTERFACE;