ReactOS 0.4.16-dev-336-gb667d82
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)
 
template<class T >
BOOL HasItemWithCLSIDImpl (LPCITEMIDLIST pidl)
 
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
 
- Protected Attributes inherited from CEnumIDListBase
ENUMLISTmpFirst
 
ENUMLISTmpLast
 
ENUMLISTmpCurrent
 

Detailed Description

Definition at line 509 of file CDrivesFolder.cpp.

Member Function Documentation

◆ Initialize()

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

Definition at line 513 of file CDrivesFolder.cpp.

514 {
515 /* enumerate the folders */
516 if (dwFlags & SHCONTF_FOLDERS)
517 {
518 WCHAR wszDriveName[] = {'A', ':', '\\', '\0'};
519 DWORD dwDrivemap = GetLogicalDrives();
520
521 while (wszDriveName[0] <= 'Z')
522 {
523 if(dwDrivemap & 0x00000001L)
524 AddToEnumList(_ILCreateDrive(wszDriveName));
525 wszDriveName[0]++;
526 dwDrivemap = dwDrivemap >> 1;
527 }
528 }
529
530 /* Enumerate the items of the reg folder */
531 AppendItemsFromEnumerator(pRegEnumerator);
532
533 return S_OK;
534 }
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:1959
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: