Enter the 64 Bit MAPI Dragon

Up until today, the first rule of 64 bit MAPI was we don’t talk about 64 bit MAPI. But now we can talk about it. 64 bit MAPI has arrived!

We just released the Outlook 2010 MAPI Reference today. If you develop MAPI based applications, you’ll want to get the updated MAPI Headers that come with it. You’ll need these if you want to rebuild your application for 64 bit. We’ve also prepared an article on building MAPI applications for both 32 bit and 64 bit platforms. This article is based in part on my experience building MFCMAPI as a 64 bit application. Since we don’t provide a 64 bit mapi32.lib, to build a 64 bit MAPI application you’re going to have to use explicit linking, building on the documentation we included in the Outlook 2007 MAPI reference.

Oh yeah – that reminds me – MFCMAPI builds as a 64 bit application! Actually, it’s been possible to build MFCMAPI as 64 bit for years. I slipped those project types in a long time ago and have been quietly maintaining them, even before I had an actual 64 bit build of MAPI I could test against. The next release of MFCMAPI will include a 64 bit build of the project, but if you want a 64 build now, just download the source and build it yourself.


Comments (19)

  1. Lev says:

    "More properties—Documentation for an additional 38 tagged properties and named properties has been added to this release."

    Well, at least we got a count of new properties 🙂  Any word on what these properties are?


  2. Heinz says:

    This sounds like progress to me. I have one small question which is that for years Microsoft have warned developers not to use the Outlook version of MAPI for serious MAPI applicatons such as server side applications. Are you now saying Outlook MAPI is safe for such applications?

  3. Rob says:

    Excellent stuff, great to hear this – are there any plans for a 64-bit standalone MAPI download as well? 🙂

  4. Oliver Seaman says:

    Very interesting!

    It was the case some time ago that Outlook MAPI was considered unsuitable for intense, multi-threaded MAPI applications, and that downloadable MAPI should be used instead.

    I assume that’s still the case? If so, it’s a shame as it would be nice to be able to run busy MAPI services as 64 bit apps, and I don’t suppose the downloadable MAPI team are going to rebuild as a 64 bit library any time soon.

    Thanks for the update,


  5. Considering Outlook’s MAPI is the only one seeing active development, I would say the old preference of Exchange’s MAPI over Outlook’s MAPI no longer applies. Outlook itself does some intense, multi-threaded MAPI work.

    There are NO plans for a 64 bit MAPI download. The 32 bit MAPI download will see no further development and will NOT be made available as 64 bit.

  6. pcunite says:

    Excellent. Good to see Microsoft supporting Extended MAPI. This was the right thing to do.

  7. SvenC says:

    Yes, absolutely excellent!

    For fast, in-depth and Exchange-Server-portable coding MAPI has always been the way to go. Good to hear that it lives on!

  8. A A says:

    Do you know whether this version of MAPI would happily co-exist with the CLR in the same process and whether that’d be a supported configuration?


  9. Jason W says:

    Are there plans to release a lib file to implicitly link against for 64-bit when OL 2010 comes out, or are we going to have to use the explicit linking you mentioned?

  10. The plan at this time is to use explicit linking. We’re not planning on producing a .lib file, though we may still decide to produce files to help with explicit linking. In the meantime, check out the Outlook 2010 samples I posted on Codeplex. The header/cpp file they use for explicit linking should be pretty easy to rip out and apply to your project.

  11. Hi Stephen,

    Interesting stuff! I have two questions:

    1- With this new Outlook 2010 and associated MAPI, and since the downloadable MAPI won’t be around for long, is it now ok to install Outlook 2010 on an Exchange server to get [64-bit] MAPI? (e.g. Exchange 2007/2010 Hub Transport).

    2- Actually, would it have been ok to install Outlook 2007?

    Thanks, and regards

  12. Phillipe – definitely yes on the second question (Outlook 2007). Outlook 2010 isn’t officially out yet, so I can’t say it would be supportable right now to install it on the server for 64 bit MAPI, but most likely it will be supported come RTM.

  13. Sharanga Dayananda says:

    Is the offline API (introduced with OL2003) still supported on 64 bit MAPI with Outlook 2010?

    I ask because I can get it work on 32 bit Outlook, but not 64 bit?

  14. I wouldn’t expect it to not work.

  15. Lev says:

    Steve, is there a reason _WIN64 is not defined in MFCMAPI c++/preprocessor section ( for x64 configurations )?  I looked quickly through new MAPI headers and some of them actually look for the #define.


  16. My code predates (and in some cases, informs) those new headers. Lemme know if you find something not working in 64 bit that would be fixed by adding _WIN64.

  17. Lev says:

    The only thing I see that would break would be if someone hits #defines below.  You are not using them now…  but mostly I was wondering about the best practices…

    #if defined (_WIN64) && defined (_AMD64_)

    #define szScCreateConversationIndex "ScCreateConversationIndex"

    #elif defined (_WIN32) && defined (_X86_)

    #define szScCreateConversationIndex "_ScCreateConversationIndex@16"


    #error "Unknown Platform: MAPI is currently supported on Win32/X86 and Win64/AMD64"


    #if defined (_WIN64) && defined(_AMD64_)

    #define szHrDispatchNotifications "HrDispatchNotifications"

    #elif defined (_WIN32) && defined (_X86_)

    #define szHrDispatchNotifications "_HrDispatchNotifications@4"


    #error "Unknown Platform: MAPI is currently supported on Win32/X86 and Win64/AMD64"


  18. I just took a look at the project and _WIN64 does get defined for a 64 bit build. Check out the string for IDS_EDMAPIINITIALIZEFAILED which flips based on it.

  19. Lev says:

    _WIN64 is defined in MFCMAPI under Resource pre-processor( Properties->resources tab->preprocessor definitions). It’s not defined under C++ pre-processor definitions ( so it would not be pulled into the code, I believe ).  In any case, your first reply pretty much answered my question.

    Thank you.

Skip to main content