ReactOS 0.4.15-dev-7931-gfd331f1
CAdminToolsFolder Class Reference

#include <CAdminToolsFolder.h>

Inheritance diagram for CAdminToolsFolder:
Collaboration diagram for CAdminToolsFolder:

Public Member Functions

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

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
 
typedef ULONG SFGAOF
 
- 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
 

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{
29}
LPITEMIDLIST m_pidlInner
#define NULL
Definition: types.h:112

◆ ~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:326

Member Function Documentation

◆ BindToObject()

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

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: atlbase.h:39

◆ BindToStorage()

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

Definition at line 53 of file CAdminToolsFolder.cpp.

54{
55 return m_pisfInner->BindToStorage(pidl, pbcReserved, riid, ppvOut);
56}

◆ CompareIDs()

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

Implements IShellFolder.

Definition at line 58 of file CAdminToolsFolder.cpp.

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

◆ CreateViewObject()

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

Definition at line 63 of file CAdminToolsFolder.cpp.

64{
65 return m_pisfInner->CreateViewObject(hwndOwner, riid, ppvOut);
66}

◆ EnumObjects()

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

Definition at line 43 of file CAdminToolsFolder.cpp.

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

◆ EnumSearches()

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

Implements IShellFolder2.

Definition at line 131 of file CAdminToolsFolder.cpp.

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

◆ GetAttributesOf()

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

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}
#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)
override

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 E_POINTER
Definition: winerror.h:2365

◆ GetCurFolder()

HRESULT WINAPI CAdminToolsFolder::GetCurFolder ( PIDLIST_ABSOLUTE pidl)
override

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}
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:237

◆ GetDefaultColumn()

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

Implements IShellFolder2.

Definition at line 136 of file CAdminToolsFolder.cpp.

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

◆ GetDefaultColumnState()

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

Implements IShellFolder2.

Definition at line 141 of file CAdminToolsFolder.cpp.

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

◆ GetDefaultSearchGUID()

HRESULT WINAPI CAdminToolsFolder::GetDefaultSearchGUID ( GUID pguid)
override

Implements IShellFolder2.

Definition at line 126 of file CAdminToolsFolder.cpp.

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

◆ GetDetailsEx()

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

Implements IShellFolder2.

Definition at line 146 of file CAdminToolsFolder.cpp.

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

◆ GetDetailsOf()

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

Implements IShellFolder2.

Definition at line 151 of file CAdminToolsFolder.cpp.

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

◆ GetDisplayNameOf()

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

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 ERR(fmt,...)
Definition: debug.h:110
#define GET_SHGDN_RELATION(dwFlags)
Definition: precomp.h:53
#define GET_SHGDN_FOR(dwFlags)
Definition: precomp.h:52
static BOOL _ILIsSpecialFolder(LPCITEMIDLIST pidl)
LPITEMIDLIST WINAPI ILGetNext(LPCITEMIDLIST pidl)
Definition: pidl.c:864

◆ GetUIObjectOf()

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

Definition at line 91 of file CAdminToolsFolder.cpp.

93{
94 return m_pisfInner->GetUIObjectOf(hwndOwner, cidl, apidl, riid, prgfInOut, ppvOut);
95}

◆ Initialize()

HRESULT WINAPI CAdminToolsFolder::Initialize ( PCIDLIST_ABSOLUTE  pidl)
override

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}
static HRESULT SHELL32_CoCreateInitSF(LPCITEMIDLIST pidlRoot, PERSIST_FOLDER_TARGET_INFO *ppfti, LPCITEMIDLIST pidlChild, const GUID *clsid, REFIID riid, LPVOID *ppvOut)
Definition: CFindFolder.cpp:13
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define CSIDL_COMMON_ADMINTOOLS
Definition: shlobj.h:2204
#define IID_PPV_ARG(Itype, ppType)

◆ MapColumnToSCID()

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

Implements IShellFolder2.

Definition at line 156 of file CAdminToolsFolder.cpp.

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

◆ ParseDisplayName()

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

Implements IShellFolder.

Definition at line 37 of file CAdminToolsFolder.cpp.

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

◆ SetNameOf()

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

Implements IShellFolder.

Definition at line 120 of file CAdminToolsFolder.cpp.

122{
123 return m_pisfInner->SetNameOf(hwndOwner, pidl, lpName, dwFlags, pPidlOut);
124}
_In_ LPCSTR lpName
Definition: winbase.h:2789

Member Data Documentation

◆ m_pidlInner

LPITEMIDLIST CAdminToolsFolder::m_pidlInner
private

◆ m_pisfInner


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