2 * FolderItemVerb(s) implementation
4 * Copyright 2015 Mark Jansen
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef _FOLDERITEMVERBS_H_
22 #define _FOLDERITEMVERBS_H_
24 class CFolderItemVerb
:
25 public CComCoClass
<CFolderItemVerb
>,
26 public CComObjectRootEx
<CComMultiThreadModelNoCS
>,
27 public IDispatchImpl
<FolderItemVerb
, &IID_FolderItemVerb
>
30 CComPtr
<IContextMenu
> m_contextmenu
;
37 void Init(IContextMenu
* menu
, BSTR name
);
39 // *** FolderItemVerb methods ***
40 virtual HRESULT STDMETHODCALLTYPE
get_Application(IDispatch
**ppid
);
41 virtual HRESULT STDMETHODCALLTYPE
get_Parent(IDispatch
**ppid
);
42 virtual HRESULT STDMETHODCALLTYPE
get_Name(BSTR
*pbs
);
43 virtual HRESULT STDMETHODCALLTYPE
DoIt();
46 DECLARE_NOT_AGGREGATABLE(CFolderItemVerb
)
47 DECLARE_PROTECT_FINAL_CONSTRUCT()
49 BEGIN_COM_MAP(CFolderItemVerb
)
50 COM_INTERFACE_ENTRY_IID(IID_FolderItemVerb
, FolderItemVerb
)
51 COM_INTERFACE_ENTRY_IID(IID_IDispatch
, IDispatch
)
56 class CFolderItemVerbs
:
57 public CComCoClass
<CFolderItemVerbs
>,
58 public CComObjectRootEx
<CComMultiThreadModelNoCS
>,
59 public IDispatchImpl
<FolderItemVerbs
, &IID_FolderItemVerbs
>
62 CComPtr
<IContextMenu
> m_contextmenu
;
68 virtual ~CFolderItemVerbs();
70 HRESULT
Init(LPITEMIDLIST idlist
);
72 // *** FolderItemVerbs methods ***
73 virtual HRESULT STDMETHODCALLTYPE
get_Count(LONG
*plCount
);
74 virtual HRESULT STDMETHODCALLTYPE
get_Application(IDispatch
**ppid
);
75 virtual HRESULT STDMETHODCALLTYPE
get_Parent(IDispatch
**ppid
);
76 virtual HRESULT STDMETHODCALLTYPE
Item(VARIANT index
, FolderItemVerb
**ppid
);
77 virtual HRESULT STDMETHODCALLTYPE
_NewEnum(IUnknown
**ppunk
);
79 DECLARE_NOT_AGGREGATABLE(CFolderItemVerbs
)
80 DECLARE_PROTECT_FINAL_CONSTRUCT()
82 BEGIN_COM_MAP(CFolderItemVerbs
)
83 COM_INTERFACE_ENTRY_IID(IID_FolderItemVerbs
, FolderItemVerbs
)
84 COM_INTERFACE_ENTRY_IID(IID_IDispatch
, IDispatch
)