how to handle ItemEvents?

  • Thread starter Thread starter Alexander Chen
  • Start date Start date
A

Alexander Chen

I want to handle ItemEvents of the _MailItem object. users can create many
_MailItem objects through creating new mail,so the following code will not
work:


class ATL_NO_VTABLE CAddin :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CAddin, &CLSID_Addin>,
public ISupportErrorInfo,
public IDispatchImpl<IAddin, &IID_IAddin, &LIBID_HWOLADDINLib>,
public IDispatchImpl<_IDTExtensibility2, &IID__IDTExtensibility2,
&LIBID_AddInDesignerObjects>,
public IDispEventSimpleImpl<1,CAddin, &__uuidof(Outlook::_ItemsEvents)>
{
......
}

It can only catch the ItemEvents of the first inspector.
 
Back
Top