About: Extended MAPI
API Type: Mailbox AccessorAPI Interface: COM-like but not true COM. MAPI pre-dates COM.
Business Logic: Messages and AddressBook, etc.
Language Support: Unmanaged C++ only.
Direct Property Access: Yes.
Product Versions: All versions of Outlook and Exchange versions up to 2003. Also available for download.
Summary:
MAPI is the root level API and architecture for the Outlook client and its communication to Exchange. MAPI the API can be used to build client applications that utilize providers to connect to Exchange, or other messaging systems and stores. MAPI provides basic item access at a very low level - there is no business logic for contacts, tasks, meetings, appointments, etc. Everything in MAPI is viewed as a message or folder with properties there are no other specialized types in a store. MAPI the is also an interface and provider architecture for creating bridges between MAPI clients and disperate systems.
Some Points Of Interest:
- MAPI is an architecture as well an API.
- MAPI is not supported in a managed process - so, don't use .NET.
- MAPI is a COM-like API that can only be used from unmanaged C++.
- MAPI is at the root of OOM and CDO 1.21.
- MFCMAPI demonstrates MAPI code and can be used as a testing tool.
- Extended MAPI is a superset of Simple MAPI
- The term MAPI is often used to describe the Exchange/Outlook specific "Extended MAPI" but it can also apply to the standard "Simple MAPI".
- If you have the book Inside MAPI, read Steve Griffin's MAPI Internals blog, review public docs and MFCMAPI code then you will have a good foundation for Extended MAPI development. See below for links.
- MFCMAPI is an a highly flushed out sample. If you have issues with your code then see if MFCMAPI reproduces. If MFCMAPI's code works then look at its source and compare with yours to determine where the two differ. Taking this approach can save you a lot of time and may help keep you from needing to open a support case.
Backgrounders:
MAPI Programming Overview
https://msdn.microsoft.com/en-us/library/office/cc815424.aspx
Installing the MAPI Subsystem
https://msdn.microsoft.com/en-us/library/office/cc815368.aspx
How to: Choose a Specific Version of MAPI to Load
https://msdn.microsoft.com/en-us/library/office/cc815368.aspx
Steve Griffin's MAPI Internals
https://blogs.msdn.com/b/stephen_griffin/
This is the best resource for MAPI development information I know of.
Where Did I Put Those 5.5 SDK Docs?
https://blogs.msdn.com/b/stephen_griffin/archive/2008/01/31/where-did-i-put-those-5-5-sdk-docs.aspx
How Outlook, CDO, MAPI, and Providers Work Together
https://blogs.msdn.com/b/webdav_101/archive/2015/05/18/about-extended-mapi.aspx
Differences between CDO, Simple MAPI, and Extended MAPI
https://support.microsoft.com/en-us/kb/200018
MAPI and .Net
https://blogs.msdn.com/b/stephen_griffin/archive/2009/04/03/mapi-and-net.aspx#9963149
MAPI and Impersonation
https://blogs.msdn.com/b/stephen_griffin/archive/2005/04/13/mapi-and-impersonation.aspx
MAPI Multithreading Rules
https://blogs.msdn.com/b/stephen_griffin/archive/2004/09/24/mapi-multithreading-rules.aspx
The Fifth MAPI Multithreading Rule
https://blogs.msdn.com/b/stephen_griffin/archive/2009/05/22/the-fifth-mapi-multithreading-rule.aspx
Large Samples:
MFCMAPI demonstrates MAPI client code
https://support.microsoft.com/en-us/kb/291794
MFCMAPI is a very large Extended MAPI sample. If you have problems with your MAPI application then see if it reproduces with MFCMPI and check out its source code. This sample app was built from more than a decade of cases on Extended MAPI by the messaging developer support team, so it covers most coding scenarios and issues with Extended MAPI development.
MFCMAPI
https://mfcmapi.codeplex.com/
Call MrMAPI, That’s My Name, That Name Again Is MrMAPI!
https://blogs.msdn.com/b/stephen_griffin/archive/2010/11/17/call-mrmapi-that-s-my-name-that-name-again-is-mrmapi.aspx
How to use MFCMAPI to create a MAPI profile to connect to Office 365
https://blogs.msdn.com/b/dvespa/archive/2013/07/15/create-profile-connect-mfcmapi-to-office-365.aspx
Also see:
About: Mailbox Accessing APIs
https://blogs.msdn.com/b/webdav_101/archive/2015/05/28/about-mailbox-accessing-apis.aspx
Exchange and Outlook Development Help
https://blogs.msdn.com/b/webdav_101/archive/2015/05/28/exchange-and-outlook-development-help.aspx
Inside MAPI
https://www.amazon.com/Inside-Mapi-Microsoft-Programming-Series/dp/1572313129
Inside MAPI is a good book on Extended MAPI. When this book went out of print a few years ago the price for it jumped up 10 fold for even a used book and it was hard to find an old copy of it anywhere under $300. This is a book any Extended MAPI developer should look at. Now Extended MAPI is not used nearly as much and you can buy it for just a few bucks.