SECIExtractIconImpl Class

template <class TPidlMgr>
class SECIExtractIconImpl: public IExtractIcon

SECExtractIconImpl

Defined in: SECIExtractIconImpl.h

Comments

This class is a thin wrapper class of IExtractIcon interface. It only implemented the methods in the IUnknown interface and the reference counting logic. It can only be used in an ATL base project. Since its reference counting makes use of the lock count in CComModule class of ATL, i.e. a global CComModule instanace _Module. 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. Even though this class can be used without deriviation, the default implementation in general will not suit user's need. So To use this class, you need to derive from it and provide sensible implementation for all the methods of IExtractIcon other than that of IUnknown interface. The constructor need two arguments, a window handle and a PIDL. The window handle is usually the owner window of this interface. The constructor will save the window handle and make a copy of the PIDL.

For a complete documentation of IExtractIcon, please refer to windows SDK or MSDN from Microsoft.

Class Template Arguments

TPidlMgr

A SECPidlMgr derived class

Class Members

HWND m_hwndOwner

A window handle of owner window of this interface

LPITEMIDLIST m_pPidl

The pidl of the item asking for icon

TPidlMgr* m_pPidlMgr

A pointer to PIDL manager

SECIExtractIconImpl(HWND hwndOwner, LPCITEMIDLIST pidl)

Constructor