ReactOS  0.4.15-dev-3303-g1ade494
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)
 
virtual HRESULT STDMETHODCALLTYPE Next (ULONG celt, LPITEMIDLIST *rgelt, ULONG *pceltFetched)
 
virtual HRESULT STDMETHODCALLTYPE Skip (ULONG celt)
 
virtual HRESULT STDMETHODCALLTYPE Reset ()
 
virtual HRESULT STDMETHODCALLTYPE Clone (IEnumIDList **ppenum)
 
- 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)
 
- 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 495 of file CDrivesFolder.cpp.

Member Function Documentation

◆ Initialize()

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

Definition at line 499 of file CDrivesFolder.cpp.

500  {
501  /* enumerate the folders */
502  if (dwFlags & SHCONTF_FOLDERS)
503  {
504  WCHAR wszDriveName[] = {'A', ':', '\\', '\0'};
505  DWORD dwDrivemap = GetLogicalDrives();
506 
507  while (wszDriveName[0] <= 'Z')
508  {
509  if(dwDrivemap & 0x00000001L)
510  AddToEnumList(_ILCreateDrive(wszDriveName));
511  wszDriveName[0]++;
512  dwDrivemap = dwDrivemap >> 1;
513  }
514  }
515 
516  /* Enumerate the items of the reg folder */
517  AppendItemsFromEnumerator(pRegEnumerator);
518 
519  return S_OK;
520  }
LPITEMIDLIST _ILCreateDrive(LPCWSTR lpszNew)
Definition: pidl.c:1808
BOOL AddToEnumList(LPITEMIDLIST pidl)
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned long DWORD
Definition: ntddk_ex.h:95
HRESULT AppendItemsFromEnumerator(IEnumIDList *pEnum)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
DWORD WINAPI GetLogicalDrives(VOID)
Definition: disk.c:110
#define S_OK
Definition: intsafe.h:52

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