SECIEnumIDListImpl Class
template <class TPidlMgr>
class SECIEnumIDListImpl: public IEnumIDList
SECIEnumIDListImpl
Defined in: SECIEnumIDListImpl.h
Comments
This class is a wrapper of IEnumIDList interface. It also implemented the IUnknown interface and the reference counting logic. User of the class only need to override CreateEnumIDList function to create the PIDL list for a given PIDL. The template argument should be an PIDL management class derived from SECPidlMgr lt; T gt; template class. This implementation is majorly targeted for namespace or shell extension. To use this class, user should use AddToEnumList method to add a PIDL to the internal PIDL list. After a PIDL is added to the list, this class becomes the owner of the PIDL. To clean the internal PIDL list, application should use DeleteList method. It will free all the memory used by the PIDLs in the list and then clear the list and reset the current iterator.
In your overriding function CreateEnumIDList, you must initialize the m_iterCurrent to the begining of the enum ID list after you add element to the enum ID list, otherwise you will get an runtime error.
For a complete documentation of IEnumIDList, please refer to windows SDK or MSDN from Microsoft.
Class Template Arguments
TPidlMgr
A SECPidlMgr derived class
Class Members
TPidlMgr* m_pPidlMgr
A pointer to PIDL manager
list<LPITEMIDLIST> m_idlList
A list of PIDL
list<LPITEMIDLIST>::iterator m_iterCurrent
A pointer to the current PIDL
virtual BOOL CreateEnumIDList(LPCITEMIDLIST pidl, DWORD dwFlags)
Override this function to create PIDL list
void DeleteList()
Delete the PIDL in the list
void AddToEnumList(LPITEMIDLIST pidl)
Add a new PIDL to the PIDL list