ReactOS  0.4.15-dev-1638-gc0caa5c
CShellItem.h
Go to the documentation of this file.
1 /*
2  * IShellItem implementation
3  *
4  * Copyright 2008 Vincent Povirk for CodeWeavers
5  * Copyright 2009 Andrew Hill
6  *
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.
11  *
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.
16  *
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20  */
21 
22 #ifndef _SHELLITEM_H_
23 #define _SHELLITEM_H_
24 
25 class CShellItem :
26  public CComCoClass<CShellItem, &CLSID_ShellItem>,
27  public CComObjectRootEx<CComMultiThreadModelNoCS>,
28  public IShellItem,
29  public IPersistIDList
30 {
31 private:
33 
34 public:
35  CShellItem();
36  ~CShellItem();
37  HRESULT get_parent_pidl(LPITEMIDLIST *parent_pidl);
39  HRESULT get_shellfolder(IBindCtx *pbc, REFIID riid, void **ppvOut);
40 
41  // IShellItem
42  virtual HRESULT WINAPI BindToHandler(IBindCtx *pbc, REFGUID rbhid, REFIID riid, void **ppvOut);
43  virtual HRESULT WINAPI GetParent(IShellItem **ppsi);
45  virtual HRESULT WINAPI GetAttributes(SFGAOF sfgaoMask, SFGAOF *psfgaoAttribs);
46  virtual HRESULT WINAPI Compare(IShellItem *oth, SICHINTF hint, int *piOrder);
47 
48  // IPersistIDList
49  virtual HRESULT WINAPI GetClassID(CLSID *pClassID);
51  virtual HRESULT WINAPI GetIDList(PIDLIST_ABSOLUTE *ppidl);
52 
55 
57 
59  COM_INTERFACE_ENTRY_IID(IID_IShellItem, IShellItem)
60  COM_INTERFACE_ENTRY_IID(IID_IPersistIDList, IPersistIDList)
62 };
63 
64 #endif /* _SHELLITEM_H_ */
#define REFIID
Definition: guiddef.h:118
Definition: scsiwmi.h:51
REFIID riid
Definition: precomp.h:44
#define DECLARE_NOT_AGGREGATABLE(x)
Definition: atlcom.h:611
#define DECLARE_NO_REGISTRY()
Definition: atlcom.h:599
virtual HRESULT WINAPI BindToHandler(IBindCtx *pbc, REFGUID rbhid, REFIID riid, void **ppvOut)
Definition: CShellItem.cpp:101
virtual HRESULT WINAPI GetAttributes(SFGAOF sfgaoMask, SFGAOF *psfgaoAttribs)
Definition: CShellItem.cpp:165
HRESULT get_parent_pidl(LPITEMIDLIST *parent_pidl)
Definition: CShellItem.cpp:40
HRESULT get_shellfolder(IBindCtx *pbc, REFIID riid, void **ppvOut)
Definition: CShellItem.cpp:79
virtual HRESULT WINAPI GetParent(IShellItem **ppsi)
Definition: CShellItem.cpp:143
SIGDN sigdnName
Definition: shobjidl.idl:593
virtual HRESULT WINAPI Compare(IShellItem *oth, SICHINTF hint, int *piOrder)
Definition: CShellItem.cpp:191
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:541
SIGDN PWSTR * ppszName
Definition: shobjidl.idl:593
LPITEMIDLIST m_pidl
Definition: CShellItem.h:32
LONG HRESULT
Definition: typedefs.h:79
#define WINAPI
Definition: msvc.h:6
virtual HRESULT WINAPI GetDisplayName(SIGDN sigdnName, LPWSTR *ppszName)
Definition: CShellItem.cpp:160
DWORD SICHINTF
Definition: shobjidl.idl:378
DWORD hint
Definition: vfdcmd.c:88
virtual HRESULT WINAPI GetClassID(CLSID *pClassID)
Definition: CShellItem.cpp:228
virtual HRESULT WINAPI SetIDList(PCIDLIST_ABSOLUTE pidl)
Definition: CShellItem.cpp:236
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:561
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
Definition: atlcom.h:639
#define END_COM_MAP()
Definition: atlcom.h:552
WCHAR * LPWSTR
Definition: xmlstorage.h:184
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
HRESULT get_parent_shellfolder(IShellFolder **ppsf)
Definition: CShellItem.cpp:61
virtual HRESULT WINAPI GetIDList(PIDLIST_ABSOLUTE *ppidl)
Definition: CShellItem.cpp:253
static IShellFolder IShellItem **static IBindCtx LPITEMIDLIST SFGAOF
Definition: ebrowser.c:83