[SHELL32]

- Use CreateViewObject instead of QueryInterface to get a drop target from a shell folder.
CORE-9846

svn path=/trunk/; revision=68219
This commit is contained in:
Thomas Faber 2015-06-21 05:30:20 +00:00
parent c146d77c04
commit 6607052bc0
2 changed files with 3 additions and 3 deletions

View file

@ -2906,7 +2906,7 @@ HRESULT CDefView::drag_notify_subitem(DWORD grfKeyState, POINTL pt, DWORD *pdwEf
{ {
/* We are not above one of the listview's subitems. Bind to the parent folder's /* We are not above one of the listview's subitems. Bind to the parent folder's
* DropTarget interface. */ * DropTarget interface. */
hr = m_pSFParent->QueryInterface(IID_PPV_ARG(IDropTarget,&m_pCurDropTarget)); hr = m_pSFParent->CreateViewObject(NULL, IID_PPV_ARG(IDropTarget,&m_pCurDropTarget));
} }
else else
{ {

View file

@ -1086,7 +1086,7 @@ CDefaultContextMenu::DoPaste(
} }
CComPtr<IDropTarget> pdrop; CComPtr<IDropTarget> pdrop;
hr = psfTarget->QueryInterface(IID_PPV_ARG(IDropTarget, &pdrop)); hr = psfTarget->CreateViewObject(NULL, IID_PPV_ARG(IDropTarget, &pdrop));
if (FAILED(hr)) if (FAILED(hr))
{ {
ERR("Error getting IDropTarget interface\n"); ERR("Error getting IDropTarget interface\n");
@ -1154,7 +1154,7 @@ CDefaultContextMenu::DoCreateLink(
return hr; return hr;
} }
hr = psfTarget->QueryInterface(IID_PPV_ARG(IDropTarget, &pDT)); hr = psfTarget->CreateViewObject(NULL, IID_PPV_ARG(IDropTarget, &pDT));
if (FAILED(hr)) if (FAILED(hr))
{ {
ERR("no IDropTarget Interface\n"); ERR("no IDropTarget Interface\n");