ReactOS  0.4.15-dev-2964-ge2a8585
CFontsFolder Class Reference

#include <CFontsFolder.h>

Inheritance diagram for CFontsFolder:
Collaboration diagram for CFontsFolder:

Public Member Functions

 CFontsFolder ()
 
 ~CFontsFolder ()
 
virtual HRESULT WINAPI ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes)
 
virtual HRESULT WINAPI EnumObjects (HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList)
 
virtual HRESULT WINAPI BindToObject (PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
 
virtual HRESULT WINAPI BindToStorage (PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
 
virtual HRESULT WINAPI CompareIDs (LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2)
 
virtual HRESULT WINAPI CreateViewObject (HWND hwndOwner, REFIID riid, LPVOID *ppvOut)
 
virtual HRESULT WINAPI GetAttributesOf (UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut)
 
virtual HRESULT WINAPI GetUIObjectOf (HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT *prgfInOut, LPVOID *ppvOut)
 
virtual HRESULT WINAPI GetDisplayNameOf (PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet)
 
virtual HRESULT WINAPI SetNameOf (HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut)
 
virtual HRESULT WINAPI GetDefaultSearchGUID (GUID *pguid)
 
virtual HRESULT WINAPI EnumSearches (IEnumExtraSearch **ppenum)
 
virtual HRESULT WINAPI GetDefaultColumn (DWORD dwRes, ULONG *pSort, ULONG *pDisplay)
 
virtual HRESULT WINAPI GetDefaultColumnState (UINT iColumn, DWORD *pcsFlags)
 
virtual HRESULT WINAPI GetDetailsEx (PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv)
 
virtual HRESULT WINAPI GetDetailsOf (PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd)
 
virtual HRESULT WINAPI MapColumnToSCID (UINT column, SHCOLUMNID *pscid)
 
virtual HRESULT WINAPI GetClassID (CLSID *lpClassId)
 
virtual HRESULT WINAPI Initialize (PCIDLIST_ABSOLUTE pidl)
 
virtual HRESULT WINAPI GetCurFolder (PIDLIST_ABSOLUTE *pidl)
 
- 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 ()
 
- Public Member Functions inherited from IShellFolder
HRESULT ParseDisplayName ([in] HWND hwndOwner, [in] LPBC pbcReserved, [in, string] LPOLESTR lpszDisplayName, [out] ULONG *pchEaten, [out] PIDLIST_RELATIVE *ppidl, [in, out, unique] ULONG *pdwAttributes)
 
HRESULT EnumObjects ([in] HWND hwndOwner, [in] SHCONTF grfFlags, [out] IEnumIDList **ppenumIDList)
 
HRESULT BindToObject ([in] PCUIDLIST_RELATIVE pidl, [in] LPBC pbcReserved, [in] REFIID riid, [out, iid_is(riid)] void **ppvOut)
 
HRESULT BindToStorage ([in] PCUIDLIST_RELATIVE pidl, [in] LPBC pbcReserved, [in] REFIID riid, [out, iid_is(riid)] void **ppvObj)
 
HRESULT CreateViewObject ([in] HWND hwndOwner, [in] REFIID riid, [out, iid_is(riid)] void **ppvOut)
 
HRESULT GetAttributesOf ([in] UINT cidl, [in, size_is(cidl)] PCUITEMID_CHILD_ARRAY apidl, [in, out] SFGAOF *rgfInOut)
 
HRESULT GetUIObjectOf ([in] HWND hwndOwner, [in] UINT cidl, [in, size_is(cidl)] PCUITEMID_CHILD_ARRAY apidl, [in] REFIID riid, [in, out, unique] UINT *prgfInOut, [out, iid_is(riid)] void **ppvOut)
 
HRESULT GetDisplayNameOf ([in] PCUITEMID_CHILD pidl, [in] SHGDNF uFlags, [out] STRRET *lpName)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 

Private Attributes

CComPtr< IShellFolder2m_pisfInner
 
LPITEMIDLIST m_pidlInner
 

Additional Inherited Members

- Public Types inherited from IShellFolder2
typedef struct IShellFolder2::SHCOLUMNIDLPSHCOLUMNID
 
typedef const SHCOLUMNIDLPCSHCOLUMNID
 
- Public Types inherited from IShellFolder
enum  tagSHGDN {
  SHGDN_NORMAL = 0, SHGDN_INFOLDER = 1, SHGDN_FOREDITING = 0x1000, SHGDN_INCLUDE_NONFILESYS = 0x2000,
  SHGDN_FORADDRESSBAR = 0x4000, SHGDN_FORPARSING = 0x8000
}
 
enum  tagSHCONTF {
  SHCONTF_FOLDERS = 32, SHCONTF_NONFOLDERS = 64, SHCONTF_INCLUDEHIDDEN = 128, SHCONTF_INIT_ON_FIRST_NEXT = 256,
  SHCONTF_NETPRINTERSRCH = 512, SHCONTF_SHAREABLE = 1024, SHCONTF_STORAGE = 2048, SHCONTF_NAVIGATION_ENUM = 0x01000,
  SHCONTF_FASTITEMS = 0x02000, SHCONTF_FLATLIST = 0x04000, SHCONTF_ENABLE_ASYNC = 0x08000, SHCONTF_INCLUDESUPERHIDDEN = 0x10000
}
 
typedef IShellFolderLPSHELLFOLDER
 
typedef enum IShellFolder::tagSHGDN SHGNO
 
typedef DWORD SHGDNF
 
typedef DWORD SHCONTF
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 
- Public Types inherited from IPersistFolder2
typedef IPersistFolder2LPPERSISTFOLDER2
 
- Public Types inherited from IPersistFolder
typedef IPersistFolderLPPERSISTFOLDER
 
- Public Types inherited from IPersist
typedef IPersistLPPERSIST
 
- 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
 
- Public Attributes inherited from IShellFolder
SFGAO_STORAGEANCESTOR typedef ULONG SFGAOF
 

Detailed Description

Definition at line 25 of file CFontsFolder.h.

Constructor & Destructor Documentation

◆ CFontsFolder()

CFontsFolder::CFontsFolder ( )

Definition at line 26 of file CFontsFolder.cpp.

27 {
28  m_pidlInner = NULL;
29 }
LPITEMIDLIST m_pidlInner
Definition: CFontsFolder.h:33
#define NULL
Definition: types.h:112

◆ ~CFontsFolder()

CFontsFolder::~CFontsFolder ( )

Definition at line 31 of file CFontsFolder.cpp.

32 {
33  if(m_pidlInner)
35 }
LPITEMIDLIST m_pidlInner
Definition: CFontsFolder.h:33
void WINAPI SHFree(LPVOID pv)
Definition: shellole.c:331

Member Function Documentation

◆ BindToObject()

HRESULT WINAPI CFontsFolder::BindToObject ( PCUIDLIST_RELATIVE  pidl,
LPBC  pbcReserved,
REFIID  riid,
LPVOID ppvOut 
)
virtual

Definition at line 48 of file CFontsFolder.cpp.

49 {
50  return m_pisfInner->BindToObject(pidl, pbcReserved, riid, ppvOut);
51 }
REFIID riid
Definition: precomp.h:44
CComPtr< IShellFolder2 > m_pisfInner
Definition: CFontsFolder.h:32

◆ BindToStorage()

HRESULT WINAPI CFontsFolder::BindToStorage ( PCUIDLIST_RELATIVE  pidl,
LPBC  pbcReserved,
REFIID  riid,
LPVOID ppvOut 
)
virtual

Definition at line 53 of file CFontsFolder.cpp.

54 {
55  return m_pisfInner->BindToStorage(pidl, pbcReserved, riid, ppvOut);
56 }
REFIID riid
Definition: precomp.h:44
CComPtr< IShellFolder2 > m_pisfInner
Definition: CFontsFolder.h:32

◆ CompareIDs()

HRESULT WINAPI CFontsFolder::CompareIDs ( LPARAM  lParam,
PCUIDLIST_RELATIVE  pidl1,
PCUIDLIST_RELATIVE  pidl2 
)
virtual

Implements IShellFolder.

Definition at line 58 of file CFontsFolder.cpp.

59 {
60  return m_pisfInner->CompareIDs(lParam, pidl1, pidl2);
61 }
CComPtr< IShellFolder2 > m_pisfInner
Definition: CFontsFolder.h:32
LPARAM lParam
Definition: combotst.c:139

◆ CreateViewObject()

HRESULT WINAPI CFontsFolder::CreateViewObject ( HWND  hwndOwner,
REFIID  riid,
LPVOID ppvOut 
)
virtual

Definition at line 63 of file CFontsFolder.cpp.

64 {
65  return m_pisfInner->CreateViewObject(hwndOwner, riid, ppvOut);
66 }
REFIID riid
Definition: precomp.h:44
CComPtr< IShellFolder2 > m_pisfInner
Definition: CFontsFolder.h:32

◆ EnumObjects()

HRESULT WINAPI CFontsFolder::EnumObjects ( HWND  hwndOwner,
DWORD  dwFlags,
LPENUMIDLIST *  ppEnumIDList 
)
virtual

Definition at line 43 of file CFontsFolder.cpp.

44 {
45  return m_pisfInner->EnumObjects(hwndOwner, dwFlags, ppEnumIDList);
46 }
CComPtr< IShellFolder2 > m_pisfInner
Definition: CFontsFolder.h:32
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175

◆ EnumSearches()

HRESULT WINAPI CFontsFolder::EnumSearches ( IEnumExtraSearch **  ppenum)
virtual

Implements IShellFolder2.

Definition at line 132 of file CFontsFolder.cpp.

133 {
134  return m_pisfInner->EnumSearches(ppenum);
135 }
CComPtr< IShellFolder2 > m_pisfInner
Definition: CFontsFolder.h:32

◆ GetAttributesOf()

HRESULT WINAPI CFontsFolder::GetAttributesOf ( UINT  cidl,
PCUITEMID_CHILD_ARRAY  apidl,
DWORD rgfInOut 
)
virtual

Definition at line 68 of file CFontsFolder.cpp.

69 {
70  static const DWORD dwFontsAttributes =
71  SFGAO_STORAGE | SFGAO_STORAGEANCESTOR | SFGAO_FILESYSANCESTOR |
72  SFGAO_FOLDER | SFGAO_FILESYSTEM | SFGAO_HASSUBFOLDER;
73 
74  if(cidl)
75  return m_pisfInner->GetAttributesOf(cidl, apidl, rgfInOut);
76 
77  if (!rgfInOut || !apidl)
78  return E_INVALIDARG;
79 
80  if (*rgfInOut == 0)
81  *rgfInOut = ~0;
82 
83  *rgfInOut &= dwFontsAttributes;
84 
85  /* make sure SFGAO_VALIDATE is cleared, some apps depend on that */
86  *rgfInOut &= ~SFGAO_VALIDATE;
87 
88  return S_OK;
89 }
CComPtr< IShellFolder2 > m_pisfInner
Definition: CFontsFolder.h:32
#define E_INVALIDARG
Definition: ddrawi.h:101
unsigned long DWORD
Definition: ntddk_ex.h:95
#define S_OK
Definition: intsafe.h:52

◆ GetClassID()

HRESULT WINAPI CFontsFolder::GetClassID ( CLSID lpClassId)
virtual

Implements IPersist.

Definition at line 162 of file CFontsFolder.cpp.

163 {
164  if (!lpClassId)
165  return E_POINTER;
166 
167  *lpClassId = CLSID_FontsFolderShortcut;
168 
169  return S_OK;
170 }
const GUID CLSID_FontsFolderShortcut
#define S_OK
Definition: intsafe.h:52
#define E_POINTER
Definition: winerror.h:2365

◆ GetCurFolder()

HRESULT WINAPI CFontsFolder::GetCurFolder ( PIDLIST_ABSOLUTE pidl)
virtual

Implements IPersistFolder2.

Definition at line 184 of file CFontsFolder.cpp.

185 {
186  if (!pidl)
187  return E_POINTER;
188  *pidl = ILClone(m_pidlInner);
189  return S_OK;
190 }
LPITEMIDLIST m_pidlInner
Definition: CFontsFolder.h:33
#define S_OK
Definition: intsafe.h:52
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:228
#define E_POINTER
Definition: winerror.h:2365

◆ GetDefaultColumn()

HRESULT WINAPI CFontsFolder::GetDefaultColumn ( DWORD  dwRes,
ULONG pSort,
ULONG pDisplay 
)
virtual

Implements IShellFolder2.

Definition at line 137 of file CFontsFolder.cpp.

138 {
139  return m_pisfInner->GetDefaultColumn(dwRes, pSort, pDisplay);
140 }
CComPtr< IShellFolder2 > m_pisfInner
Definition: CFontsFolder.h:32

◆ GetDefaultColumnState()

HRESULT WINAPI CFontsFolder::GetDefaultColumnState ( UINT  iColumn,
DWORD pcsFlags 
)
virtual

Implements IShellFolder2.

Definition at line 142 of file CFontsFolder.cpp.

143 {
144  return m_pisfInner->GetDefaultColumnState(iColumn, pcsFlags);
145 }
CComPtr< IShellFolder2 > m_pisfInner
Definition: CFontsFolder.h:32

◆ GetDefaultSearchGUID()

HRESULT WINAPI CFontsFolder::GetDefaultSearchGUID ( GUID pguid)
virtual

Implements IShellFolder2.

Definition at line 127 of file CFontsFolder.cpp.

128 {
129  return m_pisfInner->GetDefaultSearchGUID(pguid);
130 }
CComPtr< IShellFolder2 > m_pisfInner
Definition: CFontsFolder.h:32

◆ GetDetailsEx()

HRESULT WINAPI CFontsFolder::GetDetailsEx ( PCUITEMID_CHILD  pidl,
const SHCOLUMNID pscid,
VARIANT pv 
)
virtual

Implements IShellFolder2.

Definition at line 147 of file CFontsFolder.cpp.

148 {
149  return m_pisfInner->GetDetailsEx(pidl, pscid, pv);
150 }
CComPtr< IShellFolder2 > m_pisfInner
Definition: CFontsFolder.h:32

◆ GetDetailsOf()

HRESULT WINAPI CFontsFolder::GetDetailsOf ( PCUITEMID_CHILD  pidl,
UINT  iColumn,
SHELLDETAILS psd 
)
virtual

Implements IShellFolder2.

Definition at line 152 of file CFontsFolder.cpp.

153 {
154  return m_pisfInner->GetDetailsOf(pidl, iColumn, psd);
155 }
CComPtr< IShellFolder2 > m_pisfInner
Definition: CFontsFolder.h:32

◆ GetDisplayNameOf()

HRESULT WINAPI CFontsFolder::GetDisplayNameOf ( PCUITEMID_CHILD  pidl,
DWORD  dwFlags,
LPSTRRET  strRet 
)
virtual

Definition at line 97 of file CFontsFolder.cpp.

98 {
99  if (!strRet || !pidl)
100  return E_INVALIDARG;
101 
102  /* If we got an fs item just forward to the fs folder */
103  if (!_ILIsSpecialFolder(pidl))
104  return m_pisfInner->GetDisplayNameOf(pidl, dwFlags, strRet);
105 
106  /* The caller wants our path. Let fs folder handle it */
109  {
110  /* Give an empty pidl to the fs folder to tell us its path */
111  if (pidl->mkid.cb)
112  pidl = ILGetNext(pidl);
113 
114  return m_pisfInner->GetDisplayNameOf(pidl, dwFlags, strRet);
115  }
116 
117  ERR("Got empty pidl without SHGDN_FORPARSING\n");
118  return E_INVALIDARG;
119 }
#define GET_SHGDN_RELATION(dwFlags)
Definition: precomp.h:53
LPITEMIDLIST WINAPI ILGetNext(LPCITEMIDLIST pidl)
Definition: pidl.c:851
CComPtr< IShellFolder2 > m_pisfInner
Definition: CFontsFolder.h:32
static BOOL _ILIsSpecialFolder(LPCITEMIDLIST pidl)
#define GET_SHGDN_FOR(dwFlags)
Definition: precomp.h:52
#define E_INVALIDARG
Definition: ddrawi.h:101
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define ERR(fmt,...)
Definition: debug.h:110

◆ GetUIObjectOf()

HRESULT WINAPI CFontsFolder::GetUIObjectOf ( HWND  hwndOwner,
UINT  cidl,
PCUITEMID_CHILD_ARRAY  apidl,
REFIID  riid,
UINT prgfInOut,
LPVOID ppvOut 
)
virtual

Definition at line 91 of file CFontsFolder.cpp.

93 {
94  return m_pisfInner->GetUIObjectOf(hwndOwner, cidl, apidl, riid, prgfInOut, ppvOut);
95 }
REFIID riid
Definition: precomp.h:44
CComPtr< IShellFolder2 > m_pisfInner
Definition: CFontsFolder.h:32

◆ Initialize()

HRESULT WINAPI CFontsFolder::Initialize ( PCIDLIST_ABSOLUTE  pidl)
virtual

Implements IPersistFolder.

Definition at line 172 of file CFontsFolder.cpp.

173 {
174  m_pidlInner = ILClone(pidl);
175  if (!m_pidlInner)
176  return E_OUTOFMEMORY;
177 
179  &CLSID_ShellFSFolder,
180  CSIDL_FONTS,
182 }
CComPtr< IShellFolder2 > m_pisfInner
Definition: CFontsFolder.h:32
#define CSIDL_FONTS
Definition: shlobj.h:2031
#define IID_PPV_ARG(Itype, ppType)
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
LPITEMIDLIST m_pidlInner
Definition: CFontsFolder.h:33
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:228
static HRESULT SHELL32_CoCreateInitSF(LPCITEMIDLIST pidlRoot, PERSIST_FOLDER_TARGET_INFO *ppfti, LPCITEMIDLIST pidlChild, const GUID *clsid, REFIID riid, LPVOID *ppvOut)
Definition: CFindFolder.cpp:13

◆ MapColumnToSCID()

HRESULT WINAPI CFontsFolder::MapColumnToSCID ( UINT  column,
SHCOLUMNID pscid 
)
virtual

Implements IShellFolder2.

Definition at line 157 of file CFontsFolder.cpp.

158 {
159  return m_pisfInner->MapColumnToSCID(column, pscid);
160 }
CComPtr< IShellFolder2 > m_pisfInner
Definition: CFontsFolder.h:32

◆ ParseDisplayName()

HRESULT WINAPI CFontsFolder::ParseDisplayName ( HWND  hwndOwner,
LPBC  pbc,
LPOLESTR  lpszDisplayName,
DWORD pchEaten,
PIDLIST_RELATIVE ppidl,
DWORD pdwAttributes 
)
virtual

Definition at line 37 of file CFontsFolder.cpp.

39 {
40  return m_pisfInner->ParseDisplayName(hwndOwner, pbc, lpszDisplayName, pchEaten, ppidl, pdwAttributes);
41 }
CComPtr< IShellFolder2 > m_pisfInner
Definition: CFontsFolder.h:32

◆ SetNameOf()

HRESULT WINAPI CFontsFolder::SetNameOf ( HWND  hwndOwner,
PCUITEMID_CHILD  pidl,
LPCOLESTR  lpName,
DWORD  dwFlags,
PITEMID_CHILD pPidlOut 
)
virtual

Implements IShellFolder.

Definition at line 121 of file CFontsFolder.cpp.

123 {
124  return m_pisfInner->SetNameOf(hwndOwner, pidl, lpName, dwFlags, pPidlOut);
125 }
_In_ LPCSTR lpName
Definition: winbase.h:2768
CComPtr< IShellFolder2 > m_pisfInner
Definition: CFontsFolder.h:32
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175

Member Data Documentation

◆ m_pidlInner

LPITEMIDLIST CFontsFolder::m_pidlInner
private

Definition at line 33 of file CFontsFolder.h.

Referenced by CFontsFolder(), GetCurFolder(), Initialize(), and ~CFontsFolder().

◆ m_pisfInner


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