ReactOS  0.4.14-dev-1256-g2125fec
CFolderItem Class Reference

#include <CFolderItems.h>

Inheritance diagram for CFolderItem:
Collaboration diagram for CFolderItem:

Public Member Functions

 CFolderItem ()
 
 ~CFolderItem ()
 
HRESULT Initialize (Folder *folder, LPITEMIDLIST idlist)
 
virtual HRESULT STDMETHODCALLTYPE get_Application (IDispatch **ppid)
 
virtual HRESULT STDMETHODCALLTYPE get_Parent (IDispatch **ppid)
 
virtual HRESULT STDMETHODCALLTYPE get_Name (BSTR *pbs)
 
virtual HRESULT STDMETHODCALLTYPE put_Name (BSTR bs)
 
virtual HRESULT STDMETHODCALLTYPE get_Path (BSTR *pbs)
 
virtual HRESULT STDMETHODCALLTYPE get_GetLink (IDispatch **ppid)
 
virtual HRESULT STDMETHODCALLTYPE get_GetFolder (IDispatch **ppid)
 
virtual HRESULT STDMETHODCALLTYPE get_IsLink (VARIANT_BOOL *pb)
 
virtual HRESULT STDMETHODCALLTYPE get_IsFolder (VARIANT_BOOL *pb)
 
virtual HRESULT STDMETHODCALLTYPE get_IsFileSystem (VARIANT_BOOL *pb)
 
virtual HRESULT STDMETHODCALLTYPE get_IsBrowsable (VARIANT_BOOL *pb)
 
virtual HRESULT STDMETHODCALLTYPE get_ModifyDate (DATE *pdt)
 
virtual HRESULT STDMETHODCALLTYPE put_ModifyDate (DATE dt)
 
virtual HRESULT STDMETHODCALLTYPE get_Size (LONG *pul)
 
virtual HRESULT STDMETHODCALLTYPE get_Type (BSTR *pbs)
 
virtual HRESULT STDMETHODCALLTYPE Verbs (FolderItemVerbs **ppfic)
 
virtual HRESULT STDMETHODCALLTYPE InvokeVerb (VARIANT vVerb)
 
- Public Member Functions inherited from ATL::CComObjectRootEx< CComMultiThreadModelNoCS >
 ~CComObjectRootEx ()
 
ULONG InternalAddRef ()
 
ULONG InternalRelease ()
 
void Lock ()
 
void Unlock ()
 
HRESULT _AtlInitialConstruct ()
 
- Public Member Functions inherited from ATL::CComObjectRootBase
 CComObjectRootBase ()
 
 ~CComObjectRootBase ()
 
void SetVoid (void *)
 
HRESULT _AtlFinalConstruct ()
 
HRESULT FinalConstruct ()
 
void InternalFinalConstructAddRef ()
 
void InternalFinalConstructRelease ()
 
void FinalRelease ()
 

Private Attributes

CComHeapPtr< ITEMIDLISTm_idlist
 
CComPtr< Folder > m_Folder
 

Additional Inherited Members

- Static Public Member Functions inherited from ATL::CComObjectRootBase
static void WINAPI ObjectMain (bool)
 
static const struct _ATL_CATMAP_ENTRYGetCategoryMap ()
 
static HRESULT WINAPI InternalQueryInterface (void *pThis, const _ATL_INTMAP_ENTRY *pEntries, REFIID iid, void **ppvObject)
 
- Public Attributes inherited from ATL::CComObjectRootBase
LONG m_dwRef
 

Detailed Description

Definition at line 12 of file CFolderItems.h.

Constructor & Destructor Documentation

◆ CFolderItem()

CFolderItem::CFolderItem ( )

Definition at line 13 of file CFolderItems.cpp.

14 {
15 }

◆ ~CFolderItem()

CFolderItem::~CFolderItem ( )

Definition at line 17 of file CFolderItems.cpp.

18 {
19 }

Member Function Documentation

◆ get_Application()

HRESULT STDMETHODCALLTYPE CFolderItem::get_Application ( IDispatch **  ppid)
virtual

Definition at line 29 of file CFolderItems.cpp.

30 {
31  TRACE("(%p, %p)\n", this, ppid);
32  return m_Folder->get_Application(ppid);
33 }
CComPtr< Folder > m_Folder
Definition: CFolderItems.h:19
#define TRACE(s)
Definition: solgame.cpp:4

◆ get_GetFolder()

HRESULT STDMETHODCALLTYPE CFolderItem::get_GetFolder ( IDispatch **  ppid)
virtual

Definition at line 94 of file CFolderItems.cpp.

95 {
96  TRACE("(%p, %p)\n", this, ppid);
97  return E_NOTIMPL;
98 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ get_GetLink()

HRESULT STDMETHODCALLTYPE CFolderItem::get_GetLink ( IDispatch **  ppid)
virtual

Definition at line 88 of file CFolderItems.cpp.

89 {
90  TRACE("(%p, %p)\n", this, ppid);
91  return E_NOTIMPL;
92 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ get_IsBrowsable()

HRESULT STDMETHODCALLTYPE CFolderItem::get_IsBrowsable ( VARIANT_BOOL pb)
virtual

Definition at line 118 of file CFolderItems.cpp.

119 {
120  TRACE("(%p, %p)\n", this, pb);
121  return E_NOTIMPL;
122 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ get_IsFileSystem()

HRESULT STDMETHODCALLTYPE CFolderItem::get_IsFileSystem ( VARIANT_BOOL pb)
virtual

Definition at line 112 of file CFolderItems.cpp.

113 {
114  TRACE("(%p, %p)\n", this, pb);
115  return E_NOTIMPL;
116 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ get_IsFolder()

HRESULT STDMETHODCALLTYPE CFolderItem::get_IsFolder ( VARIANT_BOOL pb)
virtual

Definition at line 106 of file CFolderItems.cpp.

107 {
108  TRACE("(%p, %p)\n", this, pb);
109  return E_NOTIMPL;
110 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ get_IsLink()

HRESULT STDMETHODCALLTYPE CFolderItem::get_IsLink ( VARIANT_BOOL pb)
virtual

Definition at line 100 of file CFolderItems.cpp.

101 {
102  TRACE("(%p, %p)\n", this, pb);
103  return E_NOTIMPL;
104 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ get_ModifyDate()

HRESULT STDMETHODCALLTYPE CFolderItem::get_ModifyDate ( DATE pdt)
virtual

Definition at line 124 of file CFolderItems.cpp.

125 {
126  TRACE("(%p, %p)\n", this, pdt);
127  return E_NOTIMPL;
128 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ get_Name()

HRESULT STDMETHODCALLTYPE CFolderItem::get_Name ( BSTR pbs)
virtual

Definition at line 46 of file CFolderItems.cpp.

47 {
48  TRACE("(%p, %p)\n", this, pbs);
49 
50  *pbs = NULL;
51 
53  LPCITEMIDLIST last_part;
56  return hr;
57 
58  STRRET strret;
59  hr = Parent->GetDisplayNameOf(last_part, SHGDN_INFOLDER, &strret);
60  if (!FAILED_UNEXPECTEDLY(hr))
61  hr = StrRetToBSTR(&strret, last_part, pbs);
62 
63  return hr;
64 }
CComHeapPtr< ITEMIDLIST > m_idlist
Definition: CFolderItems.h:18
HRESULT hr
Definition: shlfolder.c:183
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn BOOLEAN Physical UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER void *Data ACPI_OBJECT_HANDLER void **Data ACPI_STRING ACPI_OBJECT_LIST ACPI_BUFFER *ReturnObjectBuffer ACPI_DEVICE_INFO **ReturnBuffer ACPI_HANDLE Parent
Definition: acpixf.h:728
#define IID_PPV_ARG(Itype, ppType)
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:78
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
HRESULT WINAPI StrRetToBSTR(STRRET *lpStrRet, LPCITEMIDLIST pidl, BSTR *pBstrOut)
Definition: string.c:1686
HRESULT WINAPI SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppv, LPCITEMIDLIST *ppidlLast)
Definition: pidl.c:1323

◆ get_Parent()

HRESULT STDMETHODCALLTYPE CFolderItem::get_Parent ( IDispatch **  ppid)
virtual

Definition at line 35 of file CFolderItems.cpp.

36 {
37  TRACE("(%p, %p)\n", this, ppid);
38  if (ppid)
39  {
40  *ppid = m_Folder;
41  m_Folder->AddRef();
42  }
43  return E_NOTIMPL;
44 }
CComPtr< Folder > m_Folder
Definition: CFolderItems.h:19
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ get_Path()

HRESULT STDMETHODCALLTYPE CFolderItem::get_Path ( BSTR pbs)
virtual

Definition at line 72 of file CFolderItems.cpp.

73 {
74  CComPtr<IShellFolder> psfDesktop;
75 
76  HRESULT hr = SHGetDesktopFolder(&psfDesktop);
77  if (!SUCCEEDED(hr))
78  return hr;
79 
80  STRRET strret;
81  hr = psfDesktop->GetDisplayNameOf(m_idlist, SHGDN_FORPARSING, &strret);
83  return hr;
84 
85  return StrRetToBSTR(&strret, NULL, pbs);
86 }
CComHeapPtr< ITEMIDLIST > m_idlist
Definition: CFolderItems.h:18
HRESULT hr
Definition: shlfolder.c:183
smooth NULL
Definition: ftsmooth.c:416
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
LONG HRESULT
Definition: typedefs.h:78
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
HRESULT WINAPI StrRetToBSTR(STRRET *lpStrRet, LPCITEMIDLIST pidl, BSTR *pBstrOut)
Definition: string.c:1686
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ get_Size()

HRESULT STDMETHODCALLTYPE CFolderItem::get_Size ( LONG pul)
virtual

Definition at line 136 of file CFolderItems.cpp.

137 {
138  TRACE("(%p, %p)\n", this, pul);
139  return E_NOTIMPL;
140 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ get_Type()

HRESULT STDMETHODCALLTYPE CFolderItem::get_Type ( BSTR pbs)
virtual

Definition at line 142 of file CFolderItems.cpp.

143 {
144  TRACE("(%p, %p)\n", this, pbs);
145  return E_NOTIMPL;
146 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Initialize()

HRESULT CFolderItem::Initialize ( Folder *  folder,
LPITEMIDLIST  idlist 
)

Definition at line 21 of file CFolderItems.cpp.

22 {
23  m_idlist.Attach(ILClone(idlist));
24  m_Folder = folder;
25  return S_OK;
26 }
CComHeapPtr< ITEMIDLIST > m_idlist
Definition: CFolderItems.h:18
CComPtr< Folder > m_Folder
Definition: CFolderItems.h:19
struct CFFOLDER folder
Definition: fdi.c:102
#define S_OK
Definition: intsafe.h:59
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:228

◆ InvokeVerb()

HRESULT STDMETHODCALLTYPE CFolderItem::InvokeVerb ( VARIANT  vVerb)
virtual

Definition at line 164 of file CFolderItems.cpp.

165 {
166  TRACE("(%p, %s)\n", this, wine_dbgstr_variant(&vVerb));
167  return E_NOTIMPL;
168 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ put_ModifyDate()

HRESULT STDMETHODCALLTYPE CFolderItem::put_ModifyDate ( DATE  dt)
virtual

Definition at line 130 of file CFolderItems.cpp.

131 {
132  TRACE("(%p, %f)\n", this, dt);
133  return E_NOTIMPL;
134 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ put_Name()

HRESULT STDMETHODCALLTYPE CFolderItem::put_Name ( BSTR  bs)
virtual

Definition at line 66 of file CFolderItems.cpp.

67 {
68  TRACE("(%p, %s)\n", this, wine_dbgstr_w(bs));
69  return E_NOTIMPL;
70 }
char * wine_dbgstr_w(const wchar_t *wstr)
Definition: atltest.h:87
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99
static struct msdos_boot_sector bs
Definition: mkdosfs.c:539

◆ Verbs()

HRESULT STDMETHODCALLTYPE CFolderItem::Verbs ( FolderItemVerbs **  ppfic)
virtual

Definition at line 148 of file CFolderItems.cpp.

149 {
150  if (!ppfic)
151  return E_POINTER;
153  HRESULT hr = verbs->Init(m_idlist);
154  if (FAILED_UNEXPECTEDLY(hr))
155  {
156  delete verbs;
157  return hr;
158  }
159  verbs->AddRef();
160  *ppfic = verbs;
161  return S_OK;
162 }
CComHeapPtr< ITEMIDLIST > m_idlist
Definition: CFolderItems.h:18
HRESULT hr
Definition: shlfolder.c:183
LONG HRESULT
Definition: typedefs.h:78
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
#define S_OK
Definition: intsafe.h:59
HRESULT Init(LPITEMIDLIST idlist)
#define E_POINTER
Definition: winerror.h:2365

Member Data Documentation

◆ m_Folder

CComPtr<Folder> CFolderItem::m_Folder
private

Definition at line 19 of file CFolderItems.h.

Referenced by get_Application(), get_Parent(), and Initialize().

◆ m_idlist

CComHeapPtr<ITEMIDLIST> CFolderItem::m_idlist
private

Definition at line 18 of file CFolderItems.h.

Referenced by get_Name(), get_Path(), Initialize(), and Verbs().


The documentation for this class was generated from the following files: