Reactos
1/*
2 * file system folder
3 *
4 * Copyright 1997 Marcus Meissner
5 * Copyright 1998, 1999, 2002 Juergen Schmied
6 * Copyright 2009 Andrew Hill
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 */
22
23#include "precomp.h"
24
25WINE_DEFAULT_DEBUG_CHANNEL (shell);
26
27/***********************************************************************
28* IDropTargetHelper implementation
29*/
30
31CDropTargetHelper::CDropTargetHelper()
32{
33}
34
35CDropTargetHelper::~CDropTargetHelper()
36{
37}
38
39HRESULT WINAPI CDropTargetHelper::InitializeFromBitmap(LPSHDRAGIMAGE pshdi, IDataObject *pDataObject)
40{
41 FIXME ("(%p)->()\n", this);
42 return E_NOTIMPL;
43}
44HRESULT WINAPI CDropTargetHelper::InitializeFromWindow(HWND hwnd, POINT *ppt, IDataObject *pDataObject)
45{
46 FIXME ("(%p)->()\n", this);
47 return E_NOTIMPL;
48}
49
50
51HRESULT WINAPI CDropTargetHelper::DragEnter (HWND hwndTarget, IDataObject* pDataObject, POINT* ppt, DWORD dwEffect)
52{
53 FIXME ("(%p)->(%p %p %p 0x%08x)\n", this, hwndTarget, pDataObject, ppt, dwEffect);
54 return E_NOTIMPL;
55}
56
57HRESULT WINAPI CDropTargetHelper::DragLeave()
58{
59 FIXME ("(%p)->()\n", this);
60 return E_NOTIMPL;
61}
62
63HRESULT WINAPI CDropTargetHelper::DragOver(POINT *ppt, DWORD dwEffect)
64{
65 FIXME ("(%p)->(%p 0x%08x)\n", this, ppt, dwEffect);
66 return E_NOTIMPL;
67}
68
69HRESULT WINAPI CDropTargetHelper::Drop(IDataObject* pDataObject, POINT* ppt, DWORD dwEffect)
70{
71 FIXME ("(%p)->(%p %p 0x%08x)\n", this, pDataObject, ppt, dwEffect);
72 return E_NOTIMPL;
73}
74
75HRESULT WINAPI CDropTargetHelper::Show(BOOL fShow)
76{
77 FIXME ("(%p)->(%u)\n", this, fShow);
78 return E_NOTIMPL;
79}
80
81/*************************************************************************
82 * SH32_SimulateDropWithSite [SHELL32.INTERNAL]
83 */
84static HRESULT SH32_SimulateDropWithSite(IDropTarget *pDT, IDataObject *pDO, DWORD grfKeyState, PPOINTL pPtl, LPDWORD pdwEffect, IUnknown *pSite)
85{
86 CScopedSetObjectWithSite site(pDT, pSite);
87 return SHSimulateDrop(pDT, pDO, grfKeyState, pPtl, pdwEffect);
88}
89
90/*************************************************************************
91 * SHSimulateDropOnClsid [SHELL32.751]
92 */
93EXTERN_C HRESULT WINAPI SHSimulateDropOnClsid(_In_ REFCLSID clsid, _In_opt_ IUnknown* pSite, _In_ IDataObject* pDO)
94{
95 CComPtr<IDropTarget> pDT;
96 HRESULT hr = SH32_ExtCoCreateInstance(NULL, &clsid, NULL, CLSCTX_ALL, IID_PPV_ARG(IDropTarget, &pDT));
97 return SUCCEEDED(hr) ? SH32_SimulateDropWithSite(pDT, pDO, 0, NULL, NULL, pSite) : hr;
98}