2 * FolderItem(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 _FOLDERITEM_H_
22 #define _FOLDERITEM_H_
26 public CComCoClass
<CFolderItem
>,
27 public CComObjectRootEx
<CComMultiThreadModelNoCS
>,
28 public IDispatchImpl
<FolderItem
, &IID_FolderItem
>
31 CComHeapPtr
<ITEMIDLIST
> m_idlist
;
37 void Init(LPITEMIDLIST idlist
);
40 // *** FolderItem methods ***
41 virtual HRESULT STDMETHODCALLTYPE
get_Application(IDispatch
**ppid
);
42 virtual HRESULT STDMETHODCALLTYPE
get_Parent(IDispatch
**ppid
);
43 virtual HRESULT STDMETHODCALLTYPE
get_Name(BSTR
*pbs
);
44 virtual HRESULT STDMETHODCALLTYPE
put_Name(BSTR bs
);
45 virtual HRESULT STDMETHODCALLTYPE
get_Path(BSTR
*pbs
);
46 virtual HRESULT STDMETHODCALLTYPE
get_GetLink(IDispatch
**ppid
);
47 virtual HRESULT STDMETHODCALLTYPE
get_GetFolder(IDispatch
**ppid
);
48 virtual HRESULT STDMETHODCALLTYPE
get_IsLink(VARIANT_BOOL
*pb
);
49 virtual HRESULT STDMETHODCALLTYPE
get_IsFolder(VARIANT_BOOL
*pb
);
50 virtual HRESULT STDMETHODCALLTYPE
get_IsFileSystem(VARIANT_BOOL
*pb
);
51 virtual HRESULT STDMETHODCALLTYPE
get_IsBrowsable(VARIANT_BOOL
*pb
);
52 virtual HRESULT STDMETHODCALLTYPE
get_ModifyDate(DATE
*pdt
);
53 virtual HRESULT STDMETHODCALLTYPE
put_ModifyDate(DATE dt
);
54 virtual HRESULT STDMETHODCALLTYPE
get_Size(LONG
*pul
);
55 virtual HRESULT STDMETHODCALLTYPE
get_Type(BSTR
*pbs
);
56 virtual HRESULT STDMETHODCALLTYPE
Verbs(FolderItemVerbs
**ppfic
);
57 virtual HRESULT STDMETHODCALLTYPE
InvokeVerb(VARIANT vVerb
);
60 DECLARE_NOT_AGGREGATABLE(CFolderItem
)
61 DECLARE_PROTECT_FINAL_CONSTRUCT()
63 BEGIN_COM_MAP(CFolderItem
)
64 COM_INTERFACE_ENTRY_IID(IID_FolderItem
, FolderItem
)
65 COM_INTERFACE_ENTRY_IID(IID_IDispatch
, IDispatch
)
70 public CComCoClass
<CFolderItems
>,
71 public CComObjectRootEx
<CComMultiThreadModelNoCS
>,
72 public IDispatchImpl
<FolderItems
, &IID_FolderItems
>
80 // *** FolderItems methods ***
81 virtual HRESULT STDMETHODCALLTYPE
get_Count(long *plCount
);
82 virtual HRESULT STDMETHODCALLTYPE
get_Application(IDispatch
**ppid
);
83 virtual HRESULT STDMETHODCALLTYPE
get_Parent(IDispatch
**ppid
);
84 virtual HRESULT STDMETHODCALLTYPE
Item(VARIANT index
, FolderItem
**ppid
);
85 virtual HRESULT STDMETHODCALLTYPE
_NewEnum(IUnknown
**ppunk
);
87 DECLARE_NOT_AGGREGATABLE(CFolderItems
)
88 DECLARE_PROTECT_FINAL_CONSTRUCT()
90 BEGIN_COM_MAP(CFolderItems
)
91 COM_INTERFACE_ENTRY_IID(IID_FolderItems
, FolderItems
)
92 COM_INTERFACE_ENTRY_IID(IID_IDispatch
, IDispatch
)