Cool MFCMAPI Feature: Logging every MAPI function called
Wanna learn Extended MAPI? Sure, we all do. Well most likely not, but in every project there comes a time when you need to add a feature and you don't know where to start. MFCMAPI can be helpful in figuring out what to do in Extended MAPI if you don't know where to start. Here is what you do. Open up MFCMAPI and go to "Tools > Debug View…". If you are a keyboard kind of guy like myself, you can press CTRL+D instead. This will launch the Debug Viewer Dialog. The Debug Viewer can be used for lot of things, but in this case try turning on logging for MAPI Functions. To do that, set the Debug Flags to 0x40000000 (DBGMAPIFunctions).
Now as you navigate the store or perform specific operations in the user interface, the Debug Viewer will show you what MAPI functions are being called. This can give you a high level overview of what a program or a feature doing the same thing should do in MAPI. Want more detail? It also outputs the line numbers and the source file where the call can be found. Since the source code is available on CodePlex you can browse it to see exactly how the objects were manipulated.
It's a pretty cool feature and one that is a hidden gem. I plan to share more of these as time permits so you too can be a MFCMAPI Power user.