2014-01-25 10:59:27 +00:00
|
|
|
#pragma once
|
|
|
|
|
2012-01-20 21:59:33 +00:00
|
|
|
typedef struct tagGUIDStruct
|
|
|
|
{
|
|
|
|
BYTE dummy; /* offset 01 is unknown */
|
|
|
|
GUID guid; /* offset 02 */
|
|
|
|
} GUIDStruct;
|
|
|
|
|
|
|
|
#define PT_GUID 0x1F
|
|
|
|
|
|
|
|
typedef struct tagPIDLDATA
|
|
|
|
{
|
|
|
|
BYTE type; /*00*/
|
|
|
|
union
|
|
|
|
{
|
|
|
|
struct tagGUIDStruct guid;
|
|
|
|
struct tagVALUEStruct value;
|
|
|
|
} u;
|
|
|
|
} PIDLDATA, *LPPIDLDATA;
|
|
|
|
|
|
|
|
typedef struct tagENUMLIST
|
|
|
|
{
|
|
|
|
struct tagENUMLIST *pNext;
|
|
|
|
LPITEMIDLIST pidl;
|
|
|
|
} ENUMLIST, *LPENUMLIST;
|
|
|
|
|
2013-07-20 09:56:58 +00:00
|
|
|
class CEnumIDList final :
|
2012-01-20 21:59:33 +00:00
|
|
|
public IEnumIDList
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CEnumIDList();
|
|
|
|
BOOL AddToEnumList(LPITEMIDLIST pidl);
|
2013-07-20 09:56:58 +00:00
|
|
|
|
2012-01-20 21:59:33 +00:00
|
|
|
// IUnknown
|
|
|
|
virtual HRESULT WINAPI QueryInterface(REFIID riid, LPVOID *ppvOut);
|
|
|
|
virtual ULONG WINAPI AddRef();
|
|
|
|
virtual ULONG WINAPI Release();
|
2013-07-20 09:56:58 +00:00
|
|
|
|
2012-01-20 21:59:33 +00:00
|
|
|
// IEnumIDList
|
|
|
|
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);
|
2013-07-20 09:56:58 +00:00
|
|
|
|
2012-01-20 21:59:33 +00:00
|
|
|
private:
|
|
|
|
LONG ref;
|
|
|
|
LPENUMLIST mpFirst;
|
|
|
|
LPENUMLIST mpLast;
|
|
|
|
LPENUMLIST mpCurrent;
|
|
|
|
};
|