Get a notification

  • Thread starter Thread starter Igor Smertin
  • Start date Start date
I

Igor Smertin

I'm trying to get a notification on type of Inbox notification. I created
AdviseSink object and use Advise() as follows:
Code:

LPMAPIADVISESINK lpAdviseSink = new CMAPITableAdviseSink();

hResult = MsgStore->Advise( cbEntryId, lpEntryId, fnevNewMail |
fnevObjectCreated | fnevObjectDeleted | fnevObjectModified |
fnevObjectMoved| fnevObjectCopied | fnevStatusObjectModified, lpAdviseSink,
&connection);

The operation is sucessfull, but no notification is received. Can anybody
help?
 
Try to get rid of the fnevStatusObjectModified bit.
You code sets up an advise sink on the IMAPIFolder, not on its contents
table. To set an advise sink on the contents table, call
IMAPIFolder::GetContenstTable(), then IMAPITable::Advise()

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top