4 * Copyright 1997 Marcus Meissner
5 * Copyright 1998, 1999, 2002 Juergen Schmied
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #include "wine/port.h"
39 #include "wine/debug.h"
42 WINE_DEFAULT_DEBUG_CHANNEL (shell);
44 /***********************************************************************
45 * IDropTargetHelper implementation
49 ICOM_VFIELD (IDropTargetHelper);
51 } IDropTargetHelperImpl;
53 static struct ICOM_VTABLE (IDropTargetHelper) vt_IDropTargetHelper;
55 #define _IUnknown_(This) (IUnknown*)&(This->lpVtbl)
56 #define _IDropTargetHelper_(This) (IDropTargetHelper*)&(This->lpVtbl)
58 /**************************************************************************
59 * IDropTargetHelper_Constructor
61 HRESULT WINAPI IDropTargetHelper_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv)
63 IDropTargetHelperImpl *dth;
65 TRACE ("unkOut=%p %s\n", pUnkOuter, shdebugstr_guid (riid));
70 return CLASS_E_NOAGGREGATION;
72 dth = (IDropTargetHelperImpl *) LocalAlloc (GMEM_ZEROINIT, sizeof (IDropTargetHelperImpl));
73 if (!dth) return E_OUTOFMEMORY;
76 dth->lpVtbl = &vt_IDropTargetHelper;
78 if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (dth), riid, ppv))) {
79 IUnknown_Release (_IUnknown_ (dth));
83 TRACE ("--(%p)\n", dth);
87 /**************************************************************************
88 * IDropTargetHelper_fnQueryInterface
90 static HRESULT WINAPI IDropTargetHelper_fnQueryInterface (IDropTargetHelper * iface, REFIID riid, LPVOID * ppvObj)
92 ICOM_THIS (IDropTargetHelperImpl, iface);
94 TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj);
98 if (IsEqualIID (riid, &IID_IUnknown) || IsEqualIID (riid, &IID_IDropTargetHelper)) {
103 IUnknown_AddRef ((IUnknown *) (*ppvObj));
104 TRACE ("-- Interface: (%p)->(%p)\n", ppvObj, *ppvObj);
107 FIXME ("-- Interface: E_NOINTERFACE\n");
108 return E_NOINTERFACE;
111 static ULONG WINAPI IDropTargetHelper_fnAddRef (IDropTargetHelper * iface)
113 ICOM_THIS (IDropTargetHelperImpl, iface);
115 TRACE ("(%p)->(count=%lu)\n", This, This->ref);
117 return ++(This->ref);
120 static ULONG WINAPI IDropTargetHelper_fnRelease (IDropTargetHelper * iface)
122 ICOM_THIS (IDropTargetHelperImpl, iface);
124 TRACE ("(%p)->(count=%lu)\n", This, This->ref);
126 if (!--(This->ref)) {
127 TRACE("-- destroying (%p)\n", This);
128 LocalFree ((HLOCAL) This);
134 static HRESULT WINAPI IDropTargetHelper_fnDragEnter (
135 IDropTargetHelper * iface,
137 IDataObject* pDataObject,
141 ICOM_THIS (IDropTargetHelperImpl, iface);
142 FIXME ("(%p)->(%p %p %p 0x%08lx)\n", This,hwndTarget, pDataObject, ppt, dwEffect);
146 static HRESULT WINAPI IDropTargetHelper_fnDragLeave (IDropTargetHelper * iface)
148 ICOM_THIS (IDropTargetHelperImpl, iface);
149 FIXME ("(%p)->()\n", This);
153 static HRESULT WINAPI IDropTargetHelper_fnDragOver (IDropTargetHelper * iface, POINT* ppt, DWORD dwEffect)
155 ICOM_THIS (IDropTargetHelperImpl, iface);
156 FIXME ("(%p)->(%p 0x%08lx)\n", This, ppt, dwEffect);
160 static HRESULT WINAPI IDropTargetHelper_fnDrop (IDropTargetHelper * iface, IDataObject* pDataObject, POINT* ppt, DWORD dwEffect)
162 ICOM_THIS (IDropTargetHelperImpl, iface);
163 FIXME ("(%p)->(%p %p 0x%08lx)\n", This, pDataObject, ppt, dwEffect);
167 static HRESULT WINAPI IDropTargetHelper_fnShow (IDropTargetHelper * iface, BOOL fShow)
169 ICOM_THIS (IDropTargetHelperImpl, iface);
170 FIXME ("(%p)->(%u)\n", This, fShow);
174 static ICOM_VTABLE (IDropTargetHelper) vt_IDropTargetHelper =
176 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
177 IDropTargetHelper_fnQueryInterface,
178 IDropTargetHelper_fnAddRef,
179 IDropTargetHelper_fnRelease,
180 IDropTargetHelper_fnDragEnter,
181 IDropTargetHelper_fnDragLeave,
182 IDropTargetHelper_fnDragOver,
183 IDropTargetHelper_fnDrop,
184 IDropTargetHelper_fnShow