ReactOS 0.4.15-dev-7906-g1b85a5f
CDrivesFolderEnum Class Reference
Inheritance diagram for CDrivesFolderEnum:
Collaboration diagram for CDrivesFolderEnum:

Public Member Functions

HRESULT WINAPI Initialize (HWND hwndOwner, DWORD dwFlags, IEnumIDList *pRegEnumerator)
 
- Public Member Functions inherited from CEnumIDListBase
 CEnumIDListBase ()
 
virtual ~CEnumIDListBase ()
 
BOOL AddToEnumList (LPITEMIDLIST pidl)
 
BOOL DeleteList ()
 
BOOL HasItemWithCLSID (LPITEMIDLIST pidl)
 
HRESULT AppendItemsFromEnumerator (IEnumIDList *pEnum)
 
STDMETHOD() Next (ULONG celt, LPITEMIDLIST *rgelt, ULONG *pceltFetched) override
 
STDMETHOD() Skip (ULONG celt) override
 
STDMETHOD() Reset () override
 
STDMETHOD() Clone (IEnumIDList **ppenum) 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 ()
 
- Public Member Functions inherited from IEnumIDList
HRESULT Next ([in] ULONG celt, [out, size_is(celt), length_is(*pceltFetched)] PITEMID_CHILD *rgelt, [out] ULONG *pceltFetched)
 
HRESULT Skip ([in] ULONG celt)
 
HRESULT Reset ()
 
HRESULT Clone ([out] IEnumIDList **ppenum)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 

Additional Inherited Members

- Public Types inherited from IEnumIDList
typedef IEnumIDListLPENUMIDLIST
 
- 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 575 of file CDrivesFolder.cpp.

Member Function Documentation

◆ Initialize()

HRESULT WINAPI CDrivesFolderEnum::Initialize ( HWND  hwndOwner,
DWORD  dwFlags,
IEnumIDList pRegEnumerator 
)
inline

Definition at line 579 of file CDrivesFolder.cpp.

580 {
581 /* enumerate the folders */
582 if (dwFlags & SHCONTF_FOLDERS)
583 {
584 WCHAR wszDriveName[] = {'A', ':', '\\', '\0'};
585 DWORD dwDrivemap = GetLogicalDrives();
586
587 while (wszDriveName[0] <= 'Z')
588 {
589 if(dwDrivemap & 0x00000001L)
590 AddToEnumList(_ILCreateDrive(wszDriveName));
591 wszDriveName[0]++;
592 dwDrivemap = dwDrivemap >> 1;
593 }
594 }
595
596 /* Enumerate the items of the reg folder */
597 AppendItemsFromEnumerator(pRegEnumerator);
598
599 return S_OK;
600 }
BOOL AddToEnumList(LPITEMIDLIST pidl)
HRESULT AppendItemsFromEnumerator(IEnumIDList *pEnum)
unsigned long DWORD
Definition: ntddk_ex.h:95
#define S_OK
Definition: intsafe.h:52
LPITEMIDLIST _ILCreateDrive(LPCWSTR lpszNew)
Definition: pidl.c:1852
DWORD WINAPI GetLogicalDrives(void)
Definition: disk.c:110
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
__wchar_t WCHAR
Definition: xmlstorage.h:180

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