ReactOS  0.4.14-dev-1007-g90d795b
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 486 of file CDrivesFolder.cpp.

Member Function Documentation

◆ Initialize()

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

Definition at line 490 of file CDrivesFolder.cpp.

491  {
492  /* enumerate the folders */
493  if (dwFlags & SHCONTF_FOLDERS)
494  {
495  WCHAR wszDriveName[] = {'A', ':', '\\', '\0'};
496  DWORD dwDrivemap = GetLogicalDrives();
497 
498  while (wszDriveName[0] <= 'Z')
499  {
500  if(dwDrivemap & 0x00000001L)
501  AddToEnumList(_ILCreateDrive(wszDriveName));
502  wszDriveName[0]++;
503  dwDrivemap = dwDrivemap >> 1;
504  }
505  }
506 
507  /* Enumerate the items of the reg folder */
508  AppendItemsFromEnumerator(pRegEnumerator);
509 
510  return S_OK;
511  }
LPITEMIDLIST _ILCreateDrive(LPCWSTR lpszNew)
Definition: pidl.c:1794
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:59

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