Hi all,
I want to develop add-in for OUTLOOK, In that for event handling use IDispEventSimpleImpl Interface, and declare handler function (fn) for the specified event using SINK_ENTRY_INFO, but whenever that particular event occurs my handler function gets call two times! why it happens so? I want to call it only single time....
MY code is.....
class ATL_NO_VTABLE CConnect :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CConnect, &CLSID_Connect>,
public IDispatchImpl<AddInDesignerObjects::_IDTExtensibil ity2, &AddInDesignerObjects::IID__IDTExtensibility2, &AddInDesignerObjects::LIBID_AddInDesignerObjec ts, 1, 0>,
public IDispEventSimpleImpl<1,CConnect,&__uuidof(Outlook: :ExplorerEvents)>,
{
public:
BEGIN_SINK_MAP(CConnect)
SINK_ENTRY_INFO(1,__uuidof(Outlook::ExplorerEvents ),0xf002,onFolderChange,&OnSimpleEventInfo)
END_SINK_MAP()
public:
//type defination to avoid compilation 'ambigous call' errors
typedef IDispEventSimpleImpl<1,CConnect, &__uuidof(Outlook::ExplorerEvents)> ExpEvents;
void __stdcall onFolderChange();
}
Any idea about this, please suggest me...
Thanks & Regards,
Shyam