2 * file system folder drop target
4 * Copyright 1997 Marcus Meissner
5 * Copyright 1998, 1999, 2002 Juergen Schmied
6 * Copyright 2009 Andrew Hill
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.
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.
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
23 #ifndef _CFSDROPTARGET_H_
24 #define _CFSDROPTARGET_H_
27 public CComObjectRootEx
<CComMultiThreadModelNoCS
>,
31 UINT cfShellIDList
; /* clipboardformat for IDropTarget */
32 BOOL fAcceptFmt
; /* flag for pending Drop */
35 BOOL
QueryDrop (DWORD dwKeyState
, LPDWORD pdwEffect
);
36 virtual HRESULT WINAPI
_DoDrop(IDataObject
*pDataObject
, DWORD dwKeyState
, POINTL pt
, DWORD
*pdwEffect
);
37 virtual HRESULT WINAPI
CopyItems(IShellFolder
*pSFFrom
, UINT cidl
, LPCITEMIDLIST
*apidl
, BOOL bCopy
);
38 BOOL
GetUniqueFileName(LPWSTR pwszBasePath
, LPCWSTR pwszExt
, LPWSTR pwszTarget
, BOOL bShortcut
);
39 static DWORD WINAPI
_DoDropThreadProc(LPVOID lpParameter
);
44 HRESULT WINAPI
Initialize(LPWSTR PathTarget
);
47 virtual HRESULT WINAPI
DragEnter(IDataObject
*pDataObject
, DWORD dwKeyState
, POINTL pt
, DWORD
*pdwEffect
);
48 virtual HRESULT WINAPI
DragOver(DWORD dwKeyState
, POINTL pt
, DWORD
*pdwEffect
);
49 virtual HRESULT WINAPI
DragLeave();
50 virtual HRESULT WINAPI
Drop(IDataObject
*pDataObject
, DWORD dwKeyState
, POINTL pt
, DWORD
*pdwEffect
);
52 DECLARE_NOT_AGGREGATABLE(CFSDropTarget
)
54 DECLARE_PROTECT_FINAL_CONSTRUCT()
56 BEGIN_COM_MAP(CFSDropTarget
)
57 COM_INTERFACE_ENTRY_IID(IID_IDropTarget
, IDropTarget
)
70 HRESULT
CFSDropTarget_CreateInstance(LPWSTR sPathTarget
, REFIID riid
, LPVOID
* ppvOut
);
72 #endif /* _CFSFOLDER_H_ */