ReactOS 0.4.15-dev-7958-gcd0bb1a
ntobjfolder.h
Go to the documentation of this file.
1/*
2 * PROJECT: NT Object Namespace shell extension
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: NT Object Namespace folder class header
5 * COPYRIGHT: Copyright 2015-2017 David Quintana <gigaherz@gmail.com>
6 */
7
8#pragma once
9
10extern const GUID CLSID_NtObjectFolder;
11
13 public CComObjectRootEx<CComMultiThreadModelNoCS>,
14 public IExtractIconW
15{
18
19public:
21
23
25
28 LPWSTR szIconFile,
30 INT *piIndex,
31 UINT *pwFlags) override;
32
34 LPCWSTR pszFile,
35 UINT nIconIndex,
36 HICON *phiconLarge,
37 HICON *phiconSmall,
38 UINT nIconSize) override;
39
42
44 COM_INTERFACE_ENTRY_IID(IID_IExtractIconW, IExtractIconW)
46
47};
48
50 public CComCoClass<CNtObjectFolder, &CLSID_NtObjectFolder>,
52{
53public:
55
57 virtual ~CNtObjectFolder();
58
59 // IShellFolder
60
62 HWND hwndOwner,
63 SHCONTF grfFlags,
64 IEnumIDList **ppenumIDList) override;
65
66protected:
67 STDMETHOD(InternalBindToObject)(
68 PWSTR path,
69 const NtPidlEntry * info,
71 LPCITEMIDLIST rest,
72 LPITEMIDLIST fullPidl,
73 LPBC pbcReserved,
74 IShellFolder** ppsfChild) override;
75
76 STDMETHOD(ResolveSymLink)(
77 const NtPidlEntry * info,
78 LPITEMIDLIST * fullPidl) override;
79
80public:
81 STDMETHOD(GetDefaultColumnState)(
82 UINT iColumn,
83 SHCOLSTATEF *pcsFlags) override;
84
85 STDMETHOD(GetDetailsEx)(
86 LPCITEMIDLIST pidl,
87 const SHCOLUMNID *pscid,
88 VARIANT *pv) override;
89
90 STDMETHOD(GetDetailsOf)(
91 LPCITEMIDLIST pidl,
92 UINT iColumn,
93 SHELLDETAILS *psd) override;
94
95 STDMETHOD(MapColumnToSCID)(
96 UINT iColumn,
97 SHCOLUMNID *pscid) override;
98
99 // IPersistFolder
100 STDMETHOD(Initialize)(PCIDLIST_ABSOLUTE pidl) override;
101
102 // Internal
104
105protected:
106 STDMETHOD(CompareIDs)(LPARAM lParam, const NtPidlEntry * first, const NtPidlEntry * second) override;
107 STDMETHOD_(ULONG, ConvertAttributes)(const NtPidlEntry * entry, PULONG inMask) override;
108 STDMETHOD_(BOOL, IsFolder)(const NtPidlEntry * info) override;
110
111 virtual HRESULT GetInfoFromPidl(LPCITEMIDLIST pcidl, const NtPidlEntry ** pentry);
112
113 HRESULT FormatValueData(DWORD contentType, PVOID td, DWORD contentsLength, PCWSTR * strContents);
114
115 HRESULT FormatContentsForDisplay(const NtPidlEntry * info, HKEY rootKey, LPCWSTR ntPath, PCWSTR * strContents);
116};
UINT cchMax
const WCHAR * class
Definition: main.c:68
#define STDMETHOD_(t, m)
Definition: basetyps.h:63
#define STDMETHOD(m)
Definition: basetyps.h:62
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
STDMETHOD() Extract(LPCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize) override
Definition: ntobjfolder.cpp:97
virtual ~CNtObjectFolderExtractIcon()
Definition: ntobjfolder.cpp:33
PCITEMID_CHILD m_pcidlChild
Definition: ntobjfolder.h:17
STDMETHOD() GetIconLocation(UINT uFlags, LPWSTR szIconFile, UINT cchMax, INT *piIndex, UINT *pwFlags) override
Definition: ntobjfolder.cpp:48
STDMETHOD_(BOOL, IsFolder)(const NtPidlEntry *info) override
STDMETHOD_(BOOL, IsSymLink)(const NtPidlEntry *info) override
HRESULT FormatValueData(DWORD contentType, PVOID td, DWORD contentsLength, PCWSTR *strContents)
HRESULT FormatContentsForDisplay(const NtPidlEntry *info, HKEY rootKey, LPCWSTR ntPath, PCWSTR *strContents)
LPARAM lParam
Definition: combotst.c:139
#define IDR_NTOBJECTFOLDER
Definition: resource.h:17
UINT uFlags
Definition: api.c:59
r parent
Definition: btrfs.c:3010
#define IsSymLink(Fcb)
Definition: ext2fs.h:285
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
const GLint * first
Definition: glext.h:5794
DWORD SHCONTF
Definition: shobjidl.idl:187
uint32_t entry
Definition: isohybrid.c:63
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:581
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:601
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
Definition: atlcom.h:679
#define DECLARE_NOT_AGGREGATABLE(x)
Definition: atlcom.h:651
#define DECLARE_REGISTRY_RESOURCEID(x)
Definition: atlcom.h:645
#define END_COM_MAP()
Definition: atlcom.h:592
static HICON
Definition: imagelist.c:84
unsigned int UINT
Definition: ndis.h:50
const GUID CLSID_NtObjectFolder
Definition: ntobjfolder.cpp:13
interface IBindCtx * LPBC
Definition: objfwd.h:18
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
const PCUITEMID_CHILD * PCUITEMID_CHILD_ARRAY
Definition: shtypes.idl:71
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
DWORD SHCOLSTATEF
Definition: shtypes.idl:142
uint16_t * PWSTR
Definition: typedefs.h:56
uint32_t * PULONG
Definition: typedefs.h:59
const uint16_t * PCWSTR
Definition: typedefs.h:57
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
LONG_PTR LPARAM
Definition: windef.h:208
int WINAPI EnumObjects(_In_ HDC, _In_ int, _In_ GOBJENUMPROC, _In_ LPARAM)
static void Initialize()
Definition: xlate.c:212
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185