SECIDropTargetImpl Class

template <class TPidlMgr>
class SECIDropTargetImpl: public IDropTarget

SECIDropTargetImpl

Defined in: SECIDropTargetImpl.h

Comments

This class is a thin wrapper class of IDropTarget 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. To use this class, you can derive from it and provide sensible implementation for all the methods of IDropTarget 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 IDropTarget, please refer to windows SDK or MSDN from Microsoft.

Class Template Arguments

TPidlMgr

A SECPidlMgr derived class

Class Members

HWND  m_hwndOwner

Window handle of the owner of this object

LPITEMIDLIST  m_pPidl

PIDL of the item this object attached to

TPidlMgr*  m_pPidlMgr

A pointer to PIDL manager

SECIDropTargetImpl(HWND hwndOwner, LPCITEMIDLIST pidl)

Constructor