2011-05-15 15:55:49 +00:00
|
|
|
/*
|
|
|
|
* Virtual Admin Tools Folder
|
|
|
|
*
|
|
|
|
* Copyright 2008 Johannes Anderwald
|
|
|
|
* Copyright 2009 Andrew Hill
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _SHFLDR_ADMINTOOLS_H_
|
|
|
|
#define _SHFLDR_ADMINTOOLS_H_
|
|
|
|
|
|
|
|
class CAdminToolsFolder :
|
2011-12-18 21:54:04 +00:00
|
|
|
public CComCoClass<CAdminToolsFolder, &CLSID_AdminFolderShortcut>,
|
|
|
|
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
|
|
|
public IShellFolder2,
|
|
|
|
public IPersistFolder2
|
2011-05-15 15:55:49 +00:00
|
|
|
{
|
2011-12-18 21:54:04 +00:00
|
|
|
private:
|
2015-09-22 18:11:32 +00:00
|
|
|
CComPtr<IShellFolder2> m_pisfInner;
|
2016-08-09 18:05:50 +00:00
|
|
|
LPITEMIDLIST m_pidlInner;
|
|
|
|
public:
|
2011-12-18 21:54:04 +00:00
|
|
|
CAdminToolsFolder();
|
|
|
|
~CAdminToolsFolder();
|
2011-05-15 15:55:49 +00:00
|
|
|
|
2011-12-18 21:54:04 +00:00
|
|
|
// IShellFolder
|
2024-03-04 23:43:39 +00:00
|
|
|
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;
|
2011-05-15 15:55:49 +00:00
|
|
|
|
2011-12-18 21:54:04 +00:00
|
|
|
/* ShellFolder2 */
|
2024-03-04 23:43:39 +00:00
|
|
|
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;
|
2011-05-15 15:55:49 +00:00
|
|
|
|
2011-12-18 21:54:04 +00:00
|
|
|
// IPersist
|
2024-03-04 23:43:39 +00:00
|
|
|
STDMETHOD(GetClassID)(CLSID *lpClassId) override;
|
2011-05-15 15:55:49 +00:00
|
|
|
|
2011-12-18 21:54:04 +00:00
|
|
|
// IPersistFolder
|
2024-03-04 23:43:39 +00:00
|
|
|
STDMETHOD(Initialize)(PCIDLIST_ABSOLUTE pidl) override;
|
2011-05-15 15:55:49 +00:00
|
|
|
|
2011-12-18 21:54:04 +00:00
|
|
|
// IPersistFolder2
|
2024-03-04 23:43:39 +00:00
|
|
|
STDMETHOD(GetCurFolder)(PIDLIST_ABSOLUTE * pidl) override;
|
2011-05-15 15:55:49 +00:00
|
|
|
|
2011-12-18 21:54:04 +00:00
|
|
|
DECLARE_REGISTRY_RESOURCEID(IDR_ADMINFOLDERSHORTCUT)
|
|
|
|
DECLARE_NOT_AGGREGATABLE(CAdminToolsFolder)
|
2011-05-15 15:55:49 +00:00
|
|
|
|
2011-12-18 21:54:04 +00:00
|
|
|
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
2011-05-15 15:55:49 +00:00
|
|
|
|
2011-12-18 21:54:04 +00:00
|
|
|
BEGIN_COM_MAP(CAdminToolsFolder)
|
|
|
|
COM_INTERFACE_ENTRY_IID(IID_IShellFolder2, IShellFolder2)
|
|
|
|
COM_INTERFACE_ENTRY_IID(IID_IShellFolder, IShellFolder)
|
|
|
|
COM_INTERFACE_ENTRY_IID(IID_IPersistFolder, IPersistFolder)
|
|
|
|
COM_INTERFACE_ENTRY_IID(IID_IPersistFolder2, IPersistFolder2)
|
|
|
|
COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist)
|
|
|
|
END_COM_MAP()
|
2011-05-15 15:55:49 +00:00
|
|
|
};
|
|
|
|
|
2014-01-25 17:24:24 +00:00
|
|
|
#endif /* _SHFLDR_ADMINTOOLS_H_ */
|