|
#ifndef _NEF_CPIDLENUM_H_
#define _NEF_CPIDLENUM_H_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "CNWSPidlMgr.h"
typedef struct tagENUMLIST
{
struct tagENUMLIST *pNext;
LPITEMIDLIST pidl;
}ENUMLIST, FAR *LPENUMLIST;
/////////////////////////////////////////////////////////////////////////////
// CPidlEnum
class ATL_NO_VTABLE CPidlEnum :
public CComObjectRootEx<CComSingleThreadModel>,
public IEnumIDList
{
public:
DECLARE_PROTECT_FINAL_CONSTRUCT()
BEGIN_COM_MAP(CPidlEnum)
COM_INTERFACE_ENTRY_IID(IID_IEnumIDList,IEnumIDList)
END_COM_MAP()
public:
LPENUMLIST m_pFirst;
LPENUMLIST m_pLast;
LPENUMLIST m_pCurrent;
CNWSPidlMgr m_PidlMgr;
public:
HRESULT FinalConstruct()
{
m_pFirst = m_pLast = m_pCurrent = NULL;
return S_OK;
}
void FinalRelease()
{
DeleteList();
m_pFirst = m_pLast = m_pCurrent = NULL;
}
public:
//IEnumIDList
STDMETHOD (Next) (DWORD, LPITEMIDLIST*, LPDWORD);
STDMETHOD (Skip) (DWORD);
STDMETHOD (Reset) (void);
STDMETHOD (Clone) (LPENUMIDLIST*);
//User Defined Funcs
BOOL DeleteList(void);
BOOL AddToEnumList(LPITEMIDLIST pidl);
HRESULT _Init(LPCITEMIDLIST pidlRoot,DWORD dwFlags);
HRESULT _AddPidls(ITEM_TYPE iItemType, LPTSTR pszPath);
};
#endif //_NEF_CPIDLENUM_H_
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
ZengXi is a SOHO guy. Her expertise includes ATL, COM, Web Service, XML, Database Systems and Information Security Technology. Now she is interested in Instant Messages softwares. She also enjoys her hobbies of reading books, listening music and watching cartoons.