ReactOS  0.4.15-dev-1184-g23e04ae
regfolder.h
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS shell extensions
3  * LICENSE: GPL - See COPYING in the top level directory
4  * FILE: dll/shellext/ntobjshex/regfolder.h
5  * PURPOSE: NT Object Namespace shell extension
6  * PROGRAMMERS: David Quintana <gigaherz@gmail.com>
7  */
8 #pragma once
9 
10 extern const GUID CLSID_RegistryFolder;
11 
13  public CComObjectRootEx<CComMultiThreadModelNoCS>,
14  public IExtractIconW
15 {
18 
19 public:
21 
23 
25 
27  UINT uFlags,
28  LPWSTR szIconFile,
29  UINT cchMax,
30  INT *piIndex,
31  UINT *pwFlags);
32 
34  LPCWSTR pszFile,
35  UINT nIconIndex,
36  HICON *phiconLarge,
37  HICON *phiconSmall,
38  UINT nIconSize);
39 
42 
44  COM_INTERFACE_ENTRY_IID(IID_IExtractIconW, IExtractIconW)
45  END_COM_MAP()
46 
47 };
48 
50  public CComCoClass<CRegistryFolder, &CLSID_RegistryFolder>,
52 {
54 
55 public:
57 
59  virtual ~CRegistryFolder();
60 
61  // IShellFolder
63  HWND hwndOwner,
64  SHCONTF grfFlags,
65  IEnumIDList **ppenumIDList);
66 
67 protected:
68  virtual HRESULT STDMETHODCALLTYPE InternalBindToObject(
69  PWSTR path,
70  const RegPidlEntry * info,
72  LPCITEMIDLIST rest,
73  LPITEMIDLIST fullPidl,
74  LPBC pbcReserved,
75  IShellFolder** ppsfChild);
76 
77 public:
78  virtual HRESULT STDMETHODCALLTYPE GetDefaultColumnState(
79  UINT iColumn,
80  SHCOLSTATEF *pcsFlags);
81 
82  virtual HRESULT STDMETHODCALLTYPE GetDetailsEx(
83  LPCITEMIDLIST pidl,
84  const SHCOLUMNID *pscid,
85  VARIANT *pv);
86 
87  virtual HRESULT STDMETHODCALLTYPE GetDetailsOf(
88  LPCITEMIDLIST pidl,
89  UINT iColumn,
90  SHELLDETAILS *psd);
91 
92  virtual HRESULT STDMETHODCALLTYPE MapColumnToSCID(
93  UINT iColumn,
94  SHCOLUMNID *pscid);
95 
96  // IPersistFolder
98 
99  // Internal
101 
102 protected:
103  virtual HRESULT STDMETHODCALLTYPE CompareIDs(LPARAM lParam, const RegPidlEntry * first, const RegPidlEntry * second);
104  virtual ULONG STDMETHODCALLTYPE ConvertAttributes(const RegPidlEntry * entry, PULONG inMask);
105  virtual BOOL STDMETHODCALLTYPE IsFolder(const RegPidlEntry * info);
106 
107  virtual HRESULT GetInfoFromPidl(LPCITEMIDLIST pcidl, const RegPidlEntry ** pentry);
108 
109  HRESULT FormatValueData(DWORD contentType, PVOID td, DWORD contentsLength, PCWSTR * strContents);
110 
111  HRESULT FormatContentsForDisplay(const RegPidlEntry * info, HKEY rootKey, LPCWSTR ntPath, PCWSTR * strContents);
112 };
const uint16_t * PCWSTR
Definition: typedefs.h:57
static HICON
Definition: imagelist.c:84
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
interface IBindCtx * LPBC
Definition: objfwd.h:18
uint16_t * PWSTR
Definition: typedefs.h:56
const GLint * first
Definition: glext.h:5794
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
virtual HRESULT STDMETHODCALLTYPE GetIconLocation(UINT uFlags, LPWSTR szIconFile, UINT cchMax, INT *piIndex, UINT *pwFlags)
Definition: regfolder.cpp:51
#define DECLARE_NOT_AGGREGATABLE(x)
Definition: atlcom.h:611
UINT uFlags
Definition: api.c:59
const GUID CLSID_RegistryFolder
Definition: regfolder.cpp:12
int32_t INT
Definition: typedefs.h:58
int WINAPI EnumObjects(_In_ HDC, _In_ int, _In_ GOBJENUMPROC, _In_ LPARAM)
DWORD SHCONTF
Definition: shobjidl.idl:187
const PCUITEMID_CHILD * PCUITEMID_CHILD_ARRAY
Definition: shtypes.idl:71
unsigned int BOOL
Definition: ntddk_ex.h:94
static HTREEITEM hRoot
Definition: treeview.c:381
PCITEMID_CHILD m_pcidlChild
Definition: regfolder.h:17
virtual ~CRegistryFolderExtractIcon()
Definition: regfolder.cpp:34
LONG_PTR LPARAM
Definition: windef.h:208
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:541
r parent
Definition: btrfs.c:2944
LONG HRESULT
Definition: typedefs.h:79
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
unsigned long DWORD
Definition: ntddk_ex.h:95
UINT cchMax
DWORD SHCOLSTATEF
Definition: shtypes.idl:142
uint32_t entry
Definition: isohybrid.c:63
#define DECLARE_REGISTRY_RESOURCEID(x)
Definition: atlcom.h:605
PCIDLIST_ABSOLUTE m_pcidlFolder
Definition: regfolder.h:16
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:561
unsigned int * PULONG
Definition: retypes.h:1
unsigned int UINT
Definition: ndis.h:50
HRESULT Initialize(LPCWSTR ntPath, PCIDLIST_ABSOLUTE parent, UINT cidl, PCUITEMID_CHILD_ARRAY apidl)
Definition: regfolder.cpp:42
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
Definition: atlcom.h:639
const WCHAR * class
Definition: main.c:68
unsigned int ULONG
Definition: retypes.h:1
#define IDR_REGISTRYFOLDER
Definition: resource.h:18
#define END_COM_MAP()
Definition: atlcom.h:552
WCHAR * LPWSTR
Definition: xmlstorage.h:184
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
LPARAM lParam
Definition: combotst.c:139
virtual HRESULT STDMETHODCALLTYPE Extract(LPCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize)
Definition: regfolder.cpp:86