ReactOS  0.4.15-dev-1070-ge1a01de
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)
 
virtual HRESULT STDMETHODCALLTYPE GetIconLocation (UINT uFlags, LPWSTR szIconFile, UINT cchMax, INT *piIndex, UINT *pwFlags)
 
virtual HRESULT STDMETHODCALLTYPE Extract (LPCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize)
 
- 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 ()
 
- 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 27 of file regfolder.cpp.

27  :
30 {
31 
32 }
PCITEMID_CHILD m_pcidlChild
Definition: regfolder.h:17
smooth NULL
Definition: ftsmooth.c:416
PCIDLIST_ABSOLUTE m_pcidlFolder
Definition: regfolder.h:16

◆ ~CRegistryFolderExtractIcon()

CRegistryFolderExtractIcon::~CRegistryFolderExtractIcon ( )
virtual

Definition at line 34 of file regfolder.cpp.

35 {
36  if (m_pcidlFolder)
38  if (m_pcidlChild)
40 }
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:925
PCITEMID_CHILD m_pcidlChild
Definition: regfolder.h:17
PCIDLIST_ABSOLUTE m_pcidlFolder
Definition: regfolder.h:16
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 
)
virtual

Implements IExtractIconW.

Definition at line 86 of file regfolder.cpp.

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

◆ GetIconLocation()

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

Implements IExtractIconW.

Definition at line 51 of file regfolder.cpp.

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

◆ Initialize()

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

Definition at line 42 of file regfolder.cpp.

43 {
45  if (cidl != 1)
46  return E_INVALIDARG;
47  m_pcidlChild = ILClone(apidl[0]);
48  return S_OK;
49 }
PCITEMID_CHILD m_pcidlChild
Definition: regfolder.h:17
#define E_INVALIDARG
Definition: ddrawi.h:101
r parent
Definition: btrfs.c:2944
#define S_OK
Definition: intsafe.h:51
PCIDLIST_ABSOLUTE m_pcidlFolder
Definition: regfolder.h:16
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:228

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: