Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Can you setup a callback or get a notification of adds/changes/deletes on a table?

1 view
Skip to first unread message

Angus

unread,
Jan 2, 2010, 6:30:31 AM1/2/10
to
Hi

I am using MAPI to get a list of all the contacts in the Outlook
Contacts folder. I cache all the contacts but that way I am not aware
of any changes made via Outlook. Eg if a contact is added, changed or
deleted. Is there a notification I can subscribe to? Or if not how
can I query for changes made eg since last poll time?

Many thanks

Angus

Angus

unread,
Jan 2, 2010, 11:06:31 AM1/2/10
to

OK I have worked out the basics - you need to create a class
inheriting from IMAPIAdviseSink for anyone interested. Call Advise on
the table you want to receive notifications for.

Now my next question is how could I get the Entry ID from a
notification message. I receive a LPNOTIFICATION object. Can I
extract the Entry ID of the object from that? Is the Entry ID always
going to be in this object? How to retrieve?

Angus

Dmitry Streblechenko

unread,
Jan 2, 2010, 9:02:48 PM1/2/10
to
No, PR_ENTRYID won't be there. But yo uwill get PR_INSTANCE_KEY, which you
can use to locate teh corresponding row and read the entry id.
You can see the notificatiosn in OutlookSpy (url below) - click IMAPIFolder,
go to the GetContentsTabel tab and look at the log at the bottom of the
window.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Angus" <angus...@gmail.com> wrote in message
news:a8c00c47-b1d1-421f...@e37g2000yqn.googlegroups.com...

0 new messages