ReactOS  0.4.15-dev-2964-ge2a8585
CAdminToolsFolder Class Reference

#include <CAdminToolsFolder.h>

Inheritance diagram for CAdminToolsFolder:
Collaboration diagram for CAdminToolsFolder:

Public Member Functions

 CAdminToolsFolder ()
 
 ~CAdminToolsFolder ()
 
virtual HRESULT WINAPI ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, ULONG *pchEaten, PIDLIST_RELATIVE *ppidl, ULONG *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 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 CAdminToolsFolder.h.

Constructor & Destructor Documentation

◆ CAdminToolsFolder()

CAdminToolsFolder::CAdminToolsFolder ( )

Definition at line 26 of file CAdminToolsFolder.cpp.

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

◆ ~CAdminToolsFolder()

CAdminToolsFolder::~CAdminToolsFolder ( )

Definition at line 31 of file CAdminToolsFolder.cpp.

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

Member Function Documentation

◆ BindToObject()

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

Definition at line 48 of file CAdminToolsFolder.cpp.

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

◆ BindToStorage()

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

Definition at line 53 of file CAdminToolsFolder.cpp.

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

◆ CompareIDs()

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

Implements IShellFolder.

Definition at line 58 of file CAdminToolsFolder.cpp.

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

◆ CreateViewObject()

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

Definition at line 63 of file CAdminToolsFolder.cpp.

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

◆ EnumObjects()

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

Definition at line 43 of file CAdminToolsFolder.cpp.

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

◆ EnumSearches()

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

Implements IShellFolder2.

Definition at line 131 of file CAdminToolsFolder.cpp.

132 {
133  return m_pisfInner->EnumSearches(ppenum);
134 }
CComPtr< IShellFolder2 > m_pisfInner

◆ GetAttributesOf()

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

Definition at line 68 of file CAdminToolsFolder.cpp.

69 {
70  static const DWORD dwAdminToolsAttributes =
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 &= dwAdminToolsAttributes;
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
#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 CAdminToolsFolder::GetClassID ( CLSID lpClassId)
virtual

Implements IPersist.

Definition at line 161 of file CAdminToolsFolder.cpp.

162 {
163  if (!lpClassId)
164  return E_POINTER;
165 
166  memcpy(lpClassId, &CLSID_AdminFolderShortcut, sizeof(CLSID));
167 
168  return S_OK;
169 }
const GUID CLSID_AdminFolderShortcut
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define S_OK
Definition: intsafe.h:52
#define E_POINTER
Definition: winerror.h:2365

◆ GetCurFolder()

HRESULT WINAPI CAdminToolsFolder::GetCurFolder ( PIDLIST_ABSOLUTE pidl)
virtual

Implements IPersistFolder2.

Definition at line 183 of file CAdminToolsFolder.cpp.

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

◆ GetDefaultColumn()

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

Implements IShellFolder2.

Definition at line 136 of file CAdminToolsFolder.cpp.

137 {
138  return m_pisfInner->GetDefaultColumn(dwRes, pSort, pDisplay);
139 }
CComPtr< IShellFolder2 > m_pisfInner

◆ GetDefaultColumnState()

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

Implements IShellFolder2.

Definition at line 141 of file CAdminToolsFolder.cpp.

142 {
143  return m_pisfInner->GetDefaultColumnState(iColumn, pcsFlags);
144 }
CComPtr< IShellFolder2 > m_pisfInner

◆ GetDefaultSearchGUID()

HRESULT WINAPI CAdminToolsFolder::GetDefaultSearchGUID ( GUID pguid)
virtual

Implements IShellFolder2.

Definition at line 126 of file CAdminToolsFolder.cpp.

127 {
128  return m_pisfInner->GetDefaultSearchGUID(pguid);
129 }
CComPtr< IShellFolder2 > m_pisfInner

◆ GetDetailsEx()

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

Implements IShellFolder2.

Definition at line 146 of file CAdminToolsFolder.cpp.

147 {
148  return m_pisfInner->GetDetailsEx(pidl, pscid, pv);
149 }
CComPtr< IShellFolder2 > m_pisfInner

◆ GetDetailsOf()

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

Implements IShellFolder2.

Definition at line 151 of file CAdminToolsFolder.cpp.

152 {
153  return m_pisfInner->GetDetailsOf(pidl, iColumn, psd);
154 }
CComPtr< IShellFolder2 > m_pisfInner

◆ GetDisplayNameOf()

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

Definition at line 97 of file CAdminToolsFolder.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 make it tell us its path */
111  if (pidl->mkid.cb)
112  pidl = ILGetNext(pidl);
113  return m_pisfInner->GetDisplayNameOf(pidl, dwFlags, strRet);
114  }
115 
116  ERR("Got empty pidl without SHGDN_FORPARSING\n");
117  return E_INVALIDARG;
118 }
#define GET_SHGDN_RELATION(dwFlags)
Definition: precomp.h:53
CComPtr< IShellFolder2 > m_pisfInner
LPITEMIDLIST WINAPI ILGetNext(LPCITEMIDLIST pidl)
Definition: pidl.c:851
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 CAdminToolsFolder::GetUIObjectOf ( HWND  hwndOwner,
UINT  cidl,
PCUITEMID_CHILD_ARRAY  apidl,
REFIID  riid,
UINT prgfInOut,
LPVOID ppvOut 
)
virtual

Definition at line 91 of file CAdminToolsFolder.cpp.

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

◆ Initialize()

HRESULT WINAPI CAdminToolsFolder::Initialize ( PCIDLIST_ABSOLUTE  pidl)
virtual

Implements IPersistFolder.

Definition at line 171 of file CAdminToolsFolder.cpp.

172 {
173  m_pidlInner = ILClone(pidl);
174  if (!m_pidlInner)
175  return E_OUTOFMEMORY;
176 
178  &CLSID_ShellFSFolder,
181 }
CComPtr< IShellFolder2 > m_pisfInner
#define IID_PPV_ARG(Itype, ppType)
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define CSIDL_COMMON_ADMINTOOLS
Definition: shlobj.h:2058
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
LPITEMIDLIST m_pidlInner

◆ MapColumnToSCID()

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

Implements IShellFolder2.

Definition at line 156 of file CAdminToolsFolder.cpp.

157 {
158  return m_pisfInner->MapColumnToSCID(column, pscid);
159 }
CComPtr< IShellFolder2 > m_pisfInner

◆ ParseDisplayName()

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

Implements IShellFolder.

Definition at line 37 of file CAdminToolsFolder.cpp.

39 {
40  return m_pisfInner->ParseDisplayName(hwndOwner, pbc, lpszDisplayName, pchEaten, ppidl, pdwAttributes);
41 }
CComPtr< IShellFolder2 > m_pisfInner

◆ SetNameOf()

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

Implements IShellFolder.

Definition at line 120 of file CAdminToolsFolder.cpp.

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

Member Data Documentation

◆ m_pidlInner

LPITEMIDLIST CAdminToolsFolder::m_pidlInner
private

◆ m_pisfInner


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