views:

199

answers:

2

I have a contact management application written in Delphi which has a “Sync with Outlook” feature that I developed 10 years ago. Now, I’m going back to add some features and fix some bugs. This sync feature uses the Outlook object model to get started, but it has an optional mode called “Use MAPI Enhancements” where it uses pure MAPI to speed up how it looks for changes, and it allows notes to be synced w/ RTF instead of just plain text.

I'm wondering if supporting two parallel paths of execution is a good idea or not.

If I went with all MAPI, I believe I'd avoid some security prompts, and I'd avoid situations where anti-virus has "script-blocking" features which block my app from connecting to Outlook. But I believe that on the down side, my 32-bit app would not be able to to connect with 64-bit Outlook 2010 using MAPI. And I wonder about the future of MAPI in general.

If I stick with the Outlook object model, will my 32-bit app be able to connect to the Outlook object model (since it's out of process COM)? If so, this is a compelling reason to keep my Outlook object model execution path in place. But if not, and if my app needs to be compiled for x64, then why not just go with pure MAPI?

+6  A: 

That is correct, you will need to compile your code either in 32 bit or 64 depending on the Outlook bitness.

As for the future of MAPI, it is still there and being actively supported by MS. Outlook 2010 is still pure MAPI.

Dmitry Streblechenko
Thanks for confirming that, Dmitry!
Troy
Dmitry, are you planning on releasing a x64 edition of Redemption?
Troy
Dmitry, nice to see you on StackOverflow. Note however that [taglines are discouraged](http://meta.stackoverflow.com/questions/5029/are-taglines-signatures-disallowed).
Georg Fritzsche
A: 

I confirmed through testing that: 1. A 32-bit application can connect to Outlook 2010 x64 through COM automation. 2. A 32-bit application cannot connect to Outlook 2010 x64 through pure MAPI.

So, it seems that I better keep my Outlook COM automation code in place to support Outlook 2010 x64, and my MAPI code can only be used on x86 Outlook.

But I noticed that the in Outlook 2007, the "PropertyAccessor" object was added which will allow you to read MAPI properties without resorting to MAPI. This might give me the benefits of reading/writing RTF Notes ... which is the main missing feature if I can't use MAPI.

Troy
The "PropertyAccessor" does not give you access to PR_RTF_COMPRESSED. Looks like MAPI is the only way to do this. Perhaps I'll need a x64 helper app to write RTF notes.
Troy