Author: tfaber
Date: Sun Jun 21 05:30:20 2015
New Revision: 68219
URL:
http://svn.reactos.org/svn/reactos?rev=68219&view=rev
Log:
[SHELL32]
- Use CreateViewObject instead of QueryInterface to get a drop target from a shell
folder.
CORE-9846
Modified:
trunk/reactos/dll/win32/shell32/CDefView.cpp
trunk/reactos/dll/win32/shell32/CDefaultContextMenu.cpp
Modified: trunk/reactos/dll/win32/shell32/CDefView.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CDefView…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CDefView.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/CDefView.cpp [iso-8859-1] Sun Jun 21 05:30:20 2015
@@ -2906,7 +2906,7 @@
{
/* We are not above one of the listview's subitems. Bind to the parent
folder's
* DropTarget interface. */
- hr =
m_pSFParent->QueryInterface(IID_PPV_ARG(IDropTarget,&m_pCurDropTarget));
+ hr = m_pSFParent->CreateViewObject(NULL,
IID_PPV_ARG(IDropTarget,&m_pCurDropTarget));
}
else
{
Modified: trunk/reactos/dll/win32/shell32/CDefaultContextMenu.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CDefault…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CDefaultContextMenu.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/CDefaultContextMenu.cpp [iso-8859-1] Sun Jun 21
05:30:20 2015
@@ -1086,7 +1086,7 @@
}
CComPtr<IDropTarget> pdrop;
- hr = psfTarget->QueryInterface(IID_PPV_ARG(IDropTarget, &pdrop));
+ hr = psfTarget->CreateViewObject(NULL, IID_PPV_ARG(IDropTarget, &pdrop));
if (FAILED(hr))
{
ERR("Error getting IDropTarget interface\n");
@@ -1154,7 +1154,7 @@
return hr;
}
- hr = psfTarget->QueryInterface(IID_PPV_ARG(IDropTarget, &pDT));
+ hr = psfTarget->CreateViewObject(NULL, IID_PPV_ARG(IDropTarget, &pDT));
if (FAILED(hr))
{
ERR("no IDropTarget Interface\n");