ReactOS 0.4.15-dev-5666-gc548b97
CSendToZip.hpp
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Zip Shell Extension
3 * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4 * PURPOSE: SendTo handler
5 * COPYRIGHT: Copyright 2019 Mark Jansen (mark.jansen@reactos.org)
6 * Copyright 2019 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
7 */
8
9#ifndef CSENDTOZIP_HPP_
10#define CSENDTOZIP_HPP_
11
13 public CComCoClass<CSendToZip, &CLSID_ZipFolderSendTo>,
14 public CComObjectRootEx<CComMultiThreadModelNoCS>,
15 public IDropTarget,
16 public IPersistFile
17{
18 CComPtr<IDataObject> m_pDataObject;
20
21public:
23 {
25 }
26
27 virtual ~CSendToZip()
28 {
30 }
31
32 // *** IShellFolder2 methods ***
33 STDMETHODIMP DragEnter(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect);
34 STDMETHODIMP DragOver(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect);
36 STDMETHODIMP Drop(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect);
37
38 // *** IPersistFile methods ***
40 {
41 return S_FALSE;
42 }
44 {
45 return S_OK;
46 }
47 STDMETHODIMP Save(LPCOLESTR pszFileName, BOOL fRemember)
48 {
49 return E_NOTIMPL;
50 }
52 {
53 return E_NOTIMPL;
54 }
56 {
57 return E_NOTIMPL;
58 }
59
60 // *** IPersist methods ***
62 {
63 *pclsid = CLSID_ZipFolderSendTo;
64 return S_OK;
65 }
66
67public:
68 DECLARE_NO_REGISTRY() // Handled manually
70
72
74 COM_INTERFACE_ENTRY_IID(IID_IDropTarget, IDropTarget)
78};
79
80#endif
LONG g_ModuleRefCnt
Definition: ACPPage.cpp:13
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define STDMETHODIMP
Definition: basetyps.h:43
STDMETHODIMP DragOver(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
Definition: CSendToZip.cpp:28
virtual ~CSendToZip()
Definition: CSendToZip.hpp:27
STDMETHODIMP DragEnter(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
Definition: CSendToZip.cpp:12
STDMETHODIMP Drop(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
Definition: CSendToZip.cpp:46
STDMETHODIMP IsDirty()
Definition: CSendToZip.hpp:39
STDMETHODIMP GetCurFile(LPOLESTR *ppszFileName)
Definition: CSendToZip.hpp:55
STDMETHODIMP Load(LPCOLESTR pszFileName, DWORD dwMode)
Definition: CSendToZip.hpp:43
BOOL m_fCanDragDrop
Definition: CSendToZip.hpp:19
STDMETHODIMP Save(LPCOLESTR pszFileName, BOOL fRemember)
Definition: CSendToZip.hpp:47
STDMETHODIMP GetClassID(CLSID *pclsid)
Definition: CSendToZip.hpp:61
CComPtr< IDataObject > m_pDataObject
Definition: CSendToZip.hpp:18
STDMETHODIMP SaveCompleted(LPCOLESTR pszFileName)
Definition: CSendToZip.hpp:51
STDMETHODIMP DragLeave()
Definition: CSendToZip.cpp:38
#define E_NOTIMPL
Definition: ddrawi.h:99
#define FALSE
Definition: types.h:117
EXTERN_C const GUID CLSID_ZipFolderSendTo
Definition: precomp.h:30
#define pt(x, y)
Definition: drawing.c:79
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
#define S_OK
Definition: intsafe.h:52
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:542
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:562
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
Definition: atlcom.h:640
#define DECLARE_NOT_AGGREGATABLE(x)
Definition: atlcom.h:612
#define END_COM_MAP()
Definition: atlcom.h:553
#define DECLARE_NO_REGISTRY()
Definition: atlcom.h:600
static LPOLESTR
Definition: stg_prop.c:27
const GUID IID_IPersistFile
const GUID IID_IPersist
Definition: proxy.cpp:14
WORD WORD PSZ PSZ pszFileName
Definition: vdmdbg.h:44
#define S_FALSE
Definition: winerror.h:2357