ReactOS 0.4.16-dev-106-g10b08aa
CRegistryFolderExtractIcon Class Reference

#include <regfolder.h>

Inheritance diagram for CRegistryFolderExtractIcon:
Collaboration diagram for CRegistryFolderExtractIcon:

Public Member Functions

 CRegistryFolderExtractIcon ()
 
virtual ~CRegistryFolderExtractIcon ()
 
HRESULT Initialize (LPCWSTR ntPath, PCIDLIST_ABSOLUTE parent, UINT cidl, PCUITEMID_CHILD_ARRAY apidl)
 
STDMETHOD() GetIconLocation (UINT uFlags, LPWSTR szIconFile, UINT cchMax, INT *piIndex, UINT *pwFlags) override
 
STDMETHOD() Extract (LPCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize) 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 GetIconLocation ([in] UINT uFlags, [out, size_is(cchMax)] LPWSTR szIconFile, [in] UINT cchMax, [out] INT *piIndex, [out] UINT *pwFlags)
 
HRESULT Extract ([in] LPCWSTR pszFile, [in] UINT nIconIndex, [out] HICON *phiconLarge, [out] HICON *phiconSmall, [in] UINT nIconSize)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 

Private Attributes

PCIDLIST_ABSOLUTE m_pcidlFolder
 
PCITEMID_CHILD m_pcidlChild
 

Additional Inherited Members

- Public Types inherited from IExtractIconW
typedef IExtractIconWLPEXTRACTICONW
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 
- 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 12 of file regfolder.h.

Constructor & Destructor Documentation

◆ CRegistryFolderExtractIcon()

CRegistryFolderExtractIcon::CRegistryFolderExtractIcon ( )

Definition at line 26 of file regfolder.cpp.

26 :
29{
30
31}
PCITEMID_CHILD m_pcidlChild
Definition: regfolder.h:17
PCIDLIST_ABSOLUTE m_pcidlFolder
Definition: regfolder.h:16
#define NULL
Definition: types.h:112

◆ ~CRegistryFolderExtractIcon()

CRegistryFolderExtractIcon::~CRegistryFolderExtractIcon ( )
virtual

Definition at line 33 of file regfolder.cpp.

34{
35 if (m_pcidlFolder)
37 if (m_pcidlChild)
39}
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:946
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41

Member Function Documentation

◆ Extract()

HRESULT STDMETHODCALLTYPE CRegistryFolderExtractIcon::Extract ( LPCWSTR  pszFile,
UINT  nIconIndex,
HICON phiconLarge,
HICON phiconSmall,
UINT  nIconSize 
)
override

Implements IExtractIconW.

Definition at line 88 of file regfolder.cpp.

94{
95 return SHDefExtractIconW(pszFile, nIconIndex, 0, phiconLarge, phiconSmall, nIconSize);
96}
HRESULT WINAPI SHDefExtractIconW(LPCWSTR pszIconFile, int iIndex, UINT uFlags, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize)
Definition: iconcache.cpp:1009

◆ GetIconLocation()

HRESULT STDMETHODCALLTYPE CRegistryFolderExtractIcon::GetIconLocation ( UINT  uFlags,
LPWSTR  szIconFile,
UINT  cchMax,
INT piIndex,
UINT pwFlags 
)
override

Implements IExtractIconW.

Definition at line 50 of file regfolder.cpp.

56{
58
59 if ((entry->cb < sizeof(RegPidlEntry)) || (entry->magic != REGISTRY_PIDL_MAGIC))
60 return E_INVALIDARG;
61
62 UINT flags = 0;
63
64 switch (entry->entryType)
65 {
66 case REG_ENTRY_KEY:
67 case REG_ENTRY_ROOT:
69 *piIndex = -IDI_REGISTRYKEY;
70 *pwFlags = flags;
71 return S_OK;
72
73 case REG_ENTRY_VALUE:
76 *piIndex = -IDI_REGISTRYVALUE;
77 *pwFlags = flags;
78 return S_OK;
79
80 default:
82 *piIndex = -IDI_NTOBJECTITEM;
83 *pwFlags = flags;
84 return S_OK;
85 }
86}
HINSTANCE g_hInstance
Definition: MainWindow.cpp:18
UINT cchMax
#define E_INVALIDARG
Definition: ddrawi.h:101
#define IDI_REGISTRYKEY
Definition: resource.h:9
#define IDI_REGISTRYVALUE
Definition: resource.h:10
#define IDI_NTOBJECTITEM
Definition: resource.h:6
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
Definition: loader.c:600
GLbitfield flags
Definition: glext.h:7161
#define S_OK
Definition: intsafe.h:52
uint32_t entry
Definition: isohybrid.c:63
unsigned int UINT
Definition: ndis.h:50
#define REGISTRY_PIDL_MAGIC
Definition: ntobjenum.h:26
@ REG_ENTRY_KEY
Definition: ntobjenum.h:53
@ REG_ENTRY_VALUE_WITH_CONTENT
Definition: ntobjenum.h:55
@ REG_ENTRY_VALUE
Definition: ntobjenum.h:54
@ REG_ENTRY_ROOT
Definition: ntobjenum.h:52

◆ Initialize()

HRESULT CRegistryFolderExtractIcon::Initialize ( LPCWSTR  ntPath,
PCIDLIST_ABSOLUTE  parent,
UINT  cidl,
PCUITEMID_CHILD_ARRAY  apidl 
)

Definition at line 41 of file regfolder.cpp.

42{
44 if (cidl != 1)
45 return E_INVALIDARG;
46 m_pcidlChild = ILClone(apidl[0]);
47 return S_OK;
48}
r parent
Definition: btrfs.c:3010
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:237

Member Data Documentation

◆ m_pcidlChild

PCITEMID_CHILD CRegistryFolderExtractIcon::m_pcidlChild
private

Definition at line 17 of file regfolder.h.

Referenced by GetIconLocation(), Initialize(), and ~CRegistryFolderExtractIcon().

◆ m_pcidlFolder

PCIDLIST_ABSOLUTE CRegistryFolderExtractIcon::m_pcidlFolder
private

Definition at line 16 of file regfolder.h.

Referenced by Initialize(), and ~CRegistryFolderExtractIcon().


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