A Brief History Of MFCMAPI

As promised, though a bit late, here are the change lists I put together for a couple of versions of MFCMAPI, along with a history lesson.

Versions 1-3 of MFCMAPI were essentially toys, built as I learned what could be done with MAPI. I can't even find them now - I wasn't very good at source control back then.

The oldest build of MFCMAPI I possess is, from 9/26/2001. At the time, it was for me just a collection of sample code that I would share with customers and other Dev Support engineers. Somewhere along the line, I found that Exchange and Outlook support folks wanted to use MFCMAPI as a tool. So I set up an internal site here at Microsoft where they could grab the latest stable build and use it. I didn't consider it ready for customers to use as a tool though, so I asked that I be kept in the loop any time it was sent out the door.

At some point (9/27/2002 to be exact) I bumped the major build number to 5.* to reflect the number of changes I had made recently. I also started work on the classic KB article: http://support.microsoft.com/kb/291794. It went live on 7/24/2003 with version Minor build numbers were introduced along the way and I kept the article updated with builds and source. The last build I published in the KB was and it was built on 2/14/2005.

In August of 2004, a program manager for Exchange contacted me about having MFCMAPI officially replace MDBVU for Exchange 12, eventually known as Exchange 2007. Of course, I jumped at the chance. The experience of checking my code into the Exchange build tree was incredibly instructive. We ended up changing over half the code to get it up to the Exchange team's standards. We took our time getting the official Exchange build ready, so I kept up the KB releases for a while. Finally on 6/7/2006, we released the newly christened "MAPI Editor". Since this version was built out of the Exchange 2003 build tree, the version number was 06.05.7830.

As I stated at the time, my eventual goal was to get the source for this new build published. I also wanted to continually update the binary as I added features and bug fixes. But as we all know, when you hand control over to someone else - and their priorities aren't in sync with yours - what you want and what you get aren't always the same.

So - this past year, with the blessing of the Exchange team, I took control back. They can still publish an official build of "MAPI Editor" if they want, but I've put all the source and the releases for MFCMAPI up on CodePlex. The first release went live on 8/30/2007, and I've done three updates since then. Since I took over building the project, I resumed my old version numbering scheme, bumping the major build number to 6.

I've rambled enough - here are those diffs:

KB ( -> MAPI Editor Download (06.05.7830):


  • Hex Editor!
  • Icons!
  • Checkbox to dismiss Help/About dialog
  • Tooltips on column headers
  • No more static linking of MAPI - all dynamic and configurable now
  • Set Personal Address Book (IAddrBook::SetPAB)
  • Display Address Book details (IAddrBook::Details)
  • Open contact from contact address book entry (CONTAB_ENTRYID)
  • Open owner for a Distribution List (PR_EMS_AB_OWNER_O)
  • Progress bars (IMAPIProgess)
  • Modify embedded messages and attachments (MAPI_MODIFY)
  • SaveChanges on embedded messages and attachments
  • Turn notifications on/off at the session level
  • Window titles based on PR_DISPLAY_NAME can also use PR_SUBJECT, PR_RULE_NAME or PR_MEMBER_NAME when appropriate
  • Delete Attachments - point at a set of messages and delete every attachment or every attachment with a certain file name
  • Property name parsing now knows ALL names for a property  number - from a table instead of a massive switch statement
  • Property name table used in new PropertyTagEditor for inputting property tags
  • "Extra props" switched from internal, add-only list to user editable list using TagArrayEditor
  • Flag parsing now uses a table instead of a massive switch statement - flag parsing now shows up nearly everywhere
  • Built in Base64 decoding
  • Persist column order on the prop list pane
  • Restrict tables using FindRow
  • Expand/Collapse tables sorted with SortOrders
  • Remove one-off form properties from messages
  • Abort submission of a message (IMsgStore::AbortSubmit)
  • Open Message Store by Entry ID
  • Open a mailbox by DN
  • Copy named props from one item to another
  • Look up registered named props by associated GUID
  • Add Unicode PSTs to a profile
  • Add arbitrary services to a profile
  • New ACL editor - allows adding, modifying and deleting ACLs
  • CompareEntryIDs support
  • IMAPIFormContainer support
  • IAddrBook::RecipOptions support
  • IMAPISession::QueryDefaultMessageOpt support
  • IAddrBook::QueryDefaultRecipOpt support
  • IAttachmentSecurity support - IsAttachmentBlocked
  • IID_IExchangeManageStore3, IID_IExchangeManageStore4 and IID_IExchangeManageStore5 support
  • IID_IProxyStoreObject support - UnWrapNoRef
  • IID_IMessageRaw support


  • Replaced all hardcoded strings with resource strings
  • Canonicalized TestFunction framework
  • Removed all try/catch blocks (better just to write code that doesn't throw)
  • Fixed a number of potential integer overflows
  • Changed most output file formats to XML
  • Added a lot more columns to the default "nice" views of tables
  • Lots of expansion to the CEditor class to support everything else
  • Lots of cleanup of string handling
  • Most structure->string parsing code overhauled
  • Lots of menu cleanup
  • Keep log file open the whole time (was opening and closing it every time!)
  • Lots of debug output cleanup
  • Los of error handling cleanup
  • Cleanup of property editor dialog code
  • Registry settings saved in HKEY_CURRENT_USER now instead of HKEY_LOCAL_MACHINE - now runs non-admin!
  • Name changed to MAPI Editor
  • Removed dependencies that blocked loading on NT4 and Windows 98
  • Lots of new property tags added

MAPI Editor Download (06.05.7830) -> Initial Codeplex population (


  • Added MAPI<->MIME conversion APIs (IConverterSession) - thanks to JasonJoh for writing the first draft of this!
  • Added code to display MSG file properties without logging on
  • Added code to read and parse FreeBusy ACLs
  • Added more default columns (deleted message size/count) to GetMailboxTable
  • Added DASL form of a property tag to the property editor dialog
  • Added ability to add properties to message recipients
  • Added ability to parse timezone properties
  • Updated logic to locate MAPISVC.INF and exposed a function to find it
  • Added code to read and parse the Exchange version from a profile
  • Added code to call HrDispatchNotifications at will
  • Removed TestFunction in favor of full Add-In support
  • Added time zone structure parsing
  • Property name, flag, and guid parsing now use a dynamic (not static) table that can be augmented by add-ins


  • Potential hang when errors occur while processing a menu item (bad message handling logic)
  • Mem leak/crash when editing a binary property and inputting an odd number of hex digits (bad error handling)
  • MAPI not initialized errors on some menu items (now we ensure it's initialized first)
  • Flag conversions weren't always displaying (bad conversion logic)
  • PT_SYSTIME alt format displayed the low member twice (bad format string)
  • When saving multiple attachments, there was no way to cancel (inserted cancel logic)
  • Crash when viewing forward rules with multiple attachments (bad format string)
  • MSG files were huge (tweaked export logic to not pass STGM_NOSCRATCH and instead use a scratch file)
  • "Display Inbox" was inconsistent with the other "Display" menu items (made it consistent)
  • In prop tag editor, lookup of a named prop that didn't exist did not clear named prop mapping fields (cleared the field)
  • Restriction parsing didn't parse flags for RES_PROPERTY (added parsing)
  • Stream editing doesn't allow user to pick Unicode or ANSI (added choice)
  • Sorting by Date style columns doesn't work (was sorting by wrong index)
  • Vista's new visual styles conflicted with dialog sizing logic (updated logic to understand themes properly)
  • Find All Named Properties did nothing (bad logic)
  • Hex Editor didn't remove whitespace when converting hex and base64 to other formats (now it's removed)
  • Hex Editor didn't blank other fields when data in the current field is invalid (now it does)
  • Fixed memory leak in certain error cases when editing a prop
  • Made property editing work in "row data only" view


  • Multitude of spelling/grammar errors (fixed them)
  • Missing help strings (added them)
  • Numerous new property tags (added them)
  • More known flag values (added them)
  • More comments
  • End of line spaces banished
  • Dead code removed
Comments (2)
  1. I’ve touched on the history of MFCMAPI before . The rebranding of MFCMAPI as MAPI Editor and posting

  2. Vicente E. Grillo says:

    Thank you !!!

    Had a MAPI problem with Office 365 for days… (+/- 365) got fix in 5 minutes with your tool.

Comments are closed.

Skip to main content