<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>SGriffin's MAPI Internals</title><link>http://blogs.msdn.com/stephen_griffin/default.aspx</link><description>MAPI - Not dead yet</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Outlook 2010 And Bitness</title><link>http://blogs.msdn.com/stephen_griffin/archive/2009/11/30/outlook-2010-and-bitness.aspx</link><pubDate>Mon, 30 Nov 2009 14:28:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9930176</guid><dc:creator>Stephen Griffin</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/stephen_griffin/comments/9930176.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stephen_griffin/commentrss.aspx?PostID=9930176</wfw:commentRss><wfw:comment>http://blogs.msdn.com/stephen_griffin/rsscomments.aspx?PostID=9930176</wfw:comment><description>&lt;p&gt;Angela’s put together a good set of &lt;a href="http://blogs.msdn.com/officedevdocs/archive/2009/11/25/developing-outlook-2010-solutions-for-32-bit-and-64-bit-systems.aspx"&gt;guidelines for developing for Outlook 2010&lt;/a&gt;, particularly as it relates to whether your code is built for 32 bit or 64 bit (what we’re calling Bitness). To summarize, all MAPI or Outlook Object Model based apps and non-managed add-ins will need to be built in both 32 and 64 bit flavors to support both target environments, managed add-ins can be built as &lt;strong&gt;Any CPU&lt;/strong&gt;, and VB 6 based add-ins and apps need to be scrapped and rewritten entirely. Read the full article to get the finer points, along with a good collection of links to more resources.&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="text-align:right; margin:0px; padding:4px 0px 4px 0px;"&gt;&lt;script type="text/javascript"&gt;digg_url = "http://blogs.msdn.com/stephen_griffin/archive/2009/11/30/outlook-2010-and-bitness.aspx";digg_title = "Outlook 2010 And Bitness";digg_bgcolor = "#FFFFFF";digg_skin = "compact";&lt;/script&gt;&lt;script src="http://digg.com/tools/diggthis.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;digg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined;&lt;/script&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9930176" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/Outlook/default.aspx">Outlook</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/MAPI/default.aspx">MAPI</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>November 2009 Release of MFCMAPI</title><link>http://blogs.msdn.com/stephen_griffin/archive/2009/11/17/november-2009-release-of-mfcmapi.aspx</link><pubDate>Tue, 17 Nov 2009 16:46:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9923666</guid><dc:creator>Stephen Griffin</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/stephen_griffin/comments/9923666.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stephen_griffin/commentrss.aspx?PostID=9923666</wfw:commentRss><wfw:comment>http://blogs.msdn.com/stephen_griffin/rsscomments.aspx?PostID=9923666</wfw:comment><description>&lt;p&gt;The November 2009 Release (build 6.0.0.1016) is live: &lt;a href="http://mfcmapi.codeplex.com"&gt;http://mfcmapi.codeplex.com&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;The September 2009 release was downloaded over 18 thousand times, with nearly 1700 of them being the 64 bit build. This exceeded the July build by about 4000 downloads. Yay MFCMAPI!&lt;/p&gt;  &lt;p&gt;Mostly bug fixes this time around. Win 7 finally made me dig into why Close All Windows wasn’t working, and I did a bit of work to make MFCMAPI a better multimon client.&lt;/p&gt;  &lt;p&gt;Here's a change list - see the &lt;a href="http://www.codeplex.com/MFCMAPI/WorkItem/List.aspx"&gt;Issue Tracker&lt;/a&gt; on Codeplex for more details, or look at the code:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Close All: Shutdown of contents table windows was swallowing the WM_CLOSE message for the other windows. Whoops! &lt;/li&gt;    &lt;li&gt;Multimon: New windows and context menus now show on the same screen as their parent window, as they should. &lt;/li&gt;    &lt;li&gt;Unicode Files: MFCMAPI can now handle files (like .msg or .eml files) that have Unicode characters in their names. &lt;/li&gt;    &lt;li&gt;Property Editor: It’s now possible to manually insert CR/LF characters directly in the hex stream of a property and write the exact data you intended, as long as you don’t touch the text editor. This is to work around a bug/feature of the rich edit control that made reproducing certain issues impossible. &lt;/li&gt;    &lt;li&gt;Smart View: Can now turn Smart View off if you’ve got a property that’s causing it to choke. Do continue to report these to me though! &lt;/li&gt;    &lt;li&gt;Version selection: Did some work to make it clearer when you’re running the wrong version of MFCMAPI (32/64) for the version of MAPI you have. &lt;/li&gt;    &lt;li&gt;Error Dialog Suppression: Identified a number of “error” dialogs that confused more than they helped and eliminated them. If there was an actual error it’s written to the debug output. &lt;/li&gt;    &lt;li&gt;Tons of minor issues – 22 total bugs tied to this release, and those are just the ones that were worth calling out. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Enjoy.&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="text-align:right; margin:0px; padding:4px 0px 4px 0px;"&gt;&lt;script type="text/javascript"&gt;digg_url = "http://blogs.msdn.com/stephen_griffin/archive/2009/11/17/november-2009-release-of-mfcmapi.aspx";digg_title = "November 2009 Release of MFCMAPI";digg_bgcolor = "#FFFFFF";digg_skin = "compact";&lt;/script&gt;&lt;script src="http://digg.com/tools/diggthis.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;digg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined;&lt;/script&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9923666" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/MAPI/default.aspx">MAPI</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/MFCMAPI/default.aspx">MFCMAPI</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>Where CDO Publishes Free Busy Information</title><link>http://blogs.msdn.com/stephen_griffin/archive/2009/11/16/where-cdo-publishes-free-busy-information.aspx</link><pubDate>Mon, 16 Nov 2009 14:05:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9922933</guid><dc:creator>Stephen Griffin</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/stephen_griffin/comments/9922933.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stephen_griffin/commentrss.aspx?PostID=9922933</wfw:commentRss><wfw:comment>http://blogs.msdn.com/stephen_griffin/rsscomments.aspx?PostID=9922933</wfw:comment><description>&lt;p&gt;From time to time, I get asked to explain where CDO publishes Free Busy information in the Public Folder store, so I figured I’d put this article together. The basic process CDO uses for updating FB information is outlined in the More Information section of &lt;a href="http://support.microsoft.com/kb/278954"&gt;KB 278954&lt;/a&gt;. We’re concerned with the part of the process summarized as “queued up to be sent to the site’s Free/Busy public folder.”&lt;/p&gt;  &lt;p&gt;The first thing CDO does is to open the Public Folder store and read a couple properties off of it, &lt;a href="http://msdn.microsoft.com/en-us/library/ms526844(EXCHG.10).aspx"&gt;PR_FREE_BUSY_FOR_LOCAL_SITE_ENTRYID&lt;/a&gt; (0x66250102) and&amp;#160; &lt;a href="http://msdn.microsoft.com/en-us/library/ee160529.aspx"&gt;PR_SPLUS_FREE_BUSY_ENTRYID&lt;/a&gt; (0x66220102). These entry IDs will point at a couple folders in the Public Folder store. The first entry ID points the Free Busy folder for the user’s site, the folder CDO wants to look in for the Free Busy message. If CDO cannot open the folder specified by PR_FREE_BUSY_FOR_LOCAL_SITE_ENTRYID, it turns to the second property, PR_SPLUS_FREE_BUSY_ENTRYID, which points at the “SCHEDULE+ FREE BUSY” folder, a child folder of the NON_IPM_SUBTREE folder. This property will point at the same folder for all users. In this case, CDO will use an algorithm similar to the one described in &lt;a href="http://msdn.microsoft.com/en-us/library/ee237796.aspx"&gt;[MS-OXOPFFB]&lt;/a&gt; to find the correct site folder for the Free Busy message.&lt;/p&gt;  &lt;p&gt;The point of failure here is the Entry ID specified in PR_FREE_BUSY_FOR_LOCAL_SITE_ENTRYID. If this points at the wrong folder, CDO will publish Free Busy information to the wrong folder, and other clients won’t see the updated Free Busy. This property is not one that anybody sets. It’s actually computed on the server side. No amount of changes to a CDO based program can get it to publish Free Busy to the correct folder if the server is handing out the wrong site folder.&lt;/p&gt;  &lt;p&gt;This is where server side troubleshooing articles such as KB &lt;a href="http://support.microsoft.com/kb/326637"&gt;326637&lt;/a&gt; and &lt;a href="http://technet.microsoft.com/en-us/library/bb123804(EXCHG.65).aspx"&gt;Exchange Public Folder Troubleshooting Resources&lt;/a&gt; come in handy. They walk you through the various things that could be wrong with site folders and how to fix them. If PR_FREE_BUSY_FOR_LOCAL_SITE_ENTRYID is pointing at the wrong folder for your users you’ll need to use the steps in those articles to locate the problem and fix it.&lt;/p&gt;  &lt;p&gt;Suppose you just want to determine if PR_FREE_BUSY_FOR_LOCAL_SITE_ENTRYID is pointing at the folder you’d expect it to point to for a particular user. You can use &lt;a href="http://mfcmapi.codeplex.com/"&gt;MFCMAPI&lt;/a&gt; to see where this entry ID points to.&lt;/p&gt;  &lt;p&gt;First, we check which folders we’re being pointed at:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Open MFCMAPI on the machine where your CDO application runs.&lt;/li&gt;    &lt;li&gt;Log on to a profile. You’ll get your best results if you can use the same profile the CDO application uses.&lt;/li&gt;    &lt;li&gt;Select the Public Folder store in the list of stores.&lt;/li&gt;    &lt;li&gt;The properties we want may or may not show in the default list of properties, so we’ll add them:&lt;/li&gt;    &lt;ol&gt;     &lt;li&gt;Click Property Pane/Modify Extra Properties&lt;/li&gt;      &lt;li&gt;Click Add&lt;/li&gt;      &lt;li&gt;In the Property Tag field, type in PR_FREE_BUSY_FOR_LOCAL_SITE_ENTRYID. The rest of the form should fill out automatically.&lt;/li&gt;      &lt;li&gt;Click OK, then click Add again.&lt;/li&gt;      &lt;li&gt;In the Property Tag field, type in PR_SPLUS_FREE_BUSY_ENTRYID. The rest of the form should fill out automatically.&lt;/li&gt;      &lt;li&gt;Click OK, then click OK again to close the Extra Properties window.&lt;/li&gt;   &lt;/ol&gt;    &lt;li&gt;We’ve added the properties, so they should show in the property pane. You can sort by the Property Name column and look them up by name, or sort by the Tag column and look them up by number (0x66250102 for PR_FREE_BUSY_FOR_LOCAL_SITE_ENTRYID and 0x66220102 for PR_SPLUS_FREE_BUSY_ENTRYID.&lt;/li&gt;    &lt;li&gt;Right click on PR_FREE_BUSY_FOR_LOCAL_SITE_ENTRYID and select Open as Entry ID or Object. In the dialog that comes up, hit OK.&lt;/li&gt;    &lt;li&gt;In the resulting hierarchy view, you can now read the name of the site folder the server has directed you to.&lt;/li&gt;    &lt;li&gt;Switch back to the main window and reselect the Public Folder store to refresh the property list.&lt;/li&gt;    &lt;li&gt;Right click on PR_SPLUS_FREE_BUSY_ENTRYID and select Open as Entry ID or Object. In the dialog that comes up, hit OK.&lt;/li&gt;    &lt;li&gt;This will display the hierarchy for the SCHEDULE+ FREE BUSY folder. Click the + icon to display the list of all the site folders in the Public Folder store.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Next, we determine which folders we should be looking at, following the algorithm from &lt;a href="http://msdn.microsoft.com/en-us/library/ee179045.aspx"&gt;[MS-OXOPFFB]:&lt;/a&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;In the main window of MFCMAPI, select Session/Display Current User Properties. Hit OK.&lt;/li&gt;    &lt;li&gt;In the Property Pane, locate PR_SEARCH_KEY (0x300B0102).&lt;/li&gt;    &lt;li&gt;Double-click on the property to open it, and take note of the Text field. For me, this says “EX:/O=MICROSOFT/OU=NORTHAMERICA/CN=RECIPIENTS/CN=420275”&lt;/li&gt;    &lt;li&gt;The appropriate site folder can be derived by truncating this string at the / before the first CN. So for me, my site folder should be “EX:/O=MICROSOFT/OU=NORTHAMERICA”.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;So, now you know what site folder the user has listed in PR_FREE_BUSY_FOR_LOCAL_SITE_ENTRYID, and you know the name of the site folder they should be using. If these two are not the same folder, then you have site folder issues and need to get them addressed.&lt;/p&gt;  &lt;p&gt;Hopefully, this should be enough to help folks who are having site folder issues to understand that CDO is just the innocent victim here when it publishes Free Busy to the wrong folder, and that server side configuration is the real villain.&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="text-align:right; margin:0px; padding:4px 0px 4px 0px;"&gt;&lt;script type="text/javascript"&gt;digg_url = "http://blogs.msdn.com/stephen_griffin/archive/2009/11/16/where-cdo-publishes-free-busy-information.aspx";digg_title = "Where CDO Publishes Free Busy Information";digg_bgcolor = "#FFFFFF";digg_skin = "compact";&lt;/script&gt;&lt;script src="http://digg.com/tools/diggthis.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;digg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined;&lt;/script&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9922933" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/Exchange/default.aspx">Exchange</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/MAPI/default.aspx">MAPI</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/Documentation/default.aspx">Documentation</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/Public+Folders/default.aspx">Public Folders</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/CDO/default.aspx">CDO</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/MFCMAPI/default.aspx">MFCMAPI</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>Strange Looking NDR</title><link>http://blogs.msdn.com/stephen_griffin/archive/2009/11/12/strange-looking-ndr.aspx</link><pubDate>Thu, 12 Nov 2009 22:54:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9921617</guid><dc:creator>Stephen Griffin</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/stephen_griffin/comments/9921617.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stephen_griffin/commentrss.aspx?PostID=9921617</wfw:commentRss><wfw:comment>http://blogs.msdn.com/stephen_griffin/rsscomments.aspx?PostID=9921617</wfw:comment><description>&lt;p&gt;Not many people are aware of the feature, but &lt;a href="http://mfcmapi.codeplex.com/"&gt;MFCMAPI&lt;/a&gt; implements a &lt;a href="http://msdn.microsoft.com/en-us/library/cc815680.aspx"&gt;MAPI Form Viewer&lt;/a&gt;. This means MFCMAPI can use MAPI to ask Outlook to display messages. You might have run into this if you ever double-click on a message in MFCMAPI. If you’re on a machine with Outlook installed, the message will open up like it does when you double-click it in Outlook. And if Outlook isn’t installed and you’re using Exchange’s MAPI, you get a scary dialog saying we &lt;a href="http://blogs.msdn.com/stephen_griffin/archive/2009/07/08/exchange-mapi-and-the-form-manager.aspx"&gt;couldn’t open the MAPI form manager&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;This is one of those dark corners of MAPI into which few people tread, and most of those who do end up cribbing or parroting the Form Viewer implementation in MFCMAPI itself, meaning nearly every issue they report related to form viewers can be reproduced in MFCMAPI. Sometimes, this turns out to be a bug in my implementation, like an errant warning while &lt;a href="http://mfcmapi.codeplex.com/WorkItem/View.aspx?WorkItemId=9146"&gt;clicking up and down through messages&lt;/a&gt; (fix coming very soon!). Other times, the problem is a bug in Outlook.&lt;/p&gt;  &lt;p&gt;My latest customer’s issue turned out to be the latter case. They had noticed that when they tried to view NDR messages with their Form Viewer, the body of the message would be full of alien looking RTF text:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fmodern\fcharset0 Consolas;}}     &lt;br /&gt;{\*\generator Riched20 12.0.6413.1000;}\viewkind4\uc1      &lt;br /&gt;\pard\fi-1440\li1440\tx1440\f0\fs21 Your message did not reach some or all of the intended recipients.\par      &lt;br /&gt;etc…”&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;What was really odd was that if you looked at the message in MFCMAPI, this text was no where to be found! And to top it off – if you opened the message from Outlook, you got the NDR message you expected.&lt;/p&gt;  &lt;p&gt;So what was going on? It’s not surprising that Outlook builds the NDR text on the fly. It’s much easier to localize it that way. And the RTF does appear to be the underlying RTF we would generate for the NDR message. But why did we display it wrong, and why did Outlook display it right?&lt;/p&gt;  &lt;p&gt;The key here is the &lt;a href="http://msdn.microsoft.com/en-us/library/cc839522.aspx"&gt;LoadForm&lt;/a&gt; function. This function takes the message class of the form we want to load. Under the covers, LoadForm looks up the message class using &lt;a href="http://msdn.microsoft.com/en-us/library/cc842436.aspx"&gt;ResolveMessageClass&lt;/a&gt; and gets the GUID for the associated class factory. The form manager then passes this GUID over to Outlook and asks for the class factory. This is where we have a problem. Outlook uses the same GUID for multiple form class factories, some of which have different attributes associated with them. The class factory we get has an attribute on it stating it should render using HTML, while the class factory we should have gotten did not have this attribute. So when it comes time to render the text, we use the wrong rendering method and get the ugly RTF text.&lt;/p&gt;  &lt;p&gt;When Outlook opens the message, being the implementer of the forms, it gets to skip many of the MAPI steps. Instead of using the message class to look up a GUID, it uses the message class to look up the class factory directly, getting the right one in the process.&lt;/p&gt;  &lt;p&gt;Based on the fact that this behavior has been unchanged for as long as we can trace back, and we’re only just now hearing of an issue with it, we chose not to fix this problem, but instead document it. So – here’s the documentation. Enjoy!&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="text-align:right; margin:0px; padding:4px 0px 4px 0px;"&gt;&lt;script type="text/javascript"&gt;digg_url = "http://blogs.msdn.com/stephen_griffin/archive/2009/11/12/strange-looking-ndr.aspx";digg_title = "Strange Looking NDR";digg_bgcolor = "#FFFFFF";digg_skin = "compact";&lt;/script&gt;&lt;script src="http://digg.com/tools/diggthis.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;digg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined;&lt;/script&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9921617" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/Outlook/default.aspx">Outlook</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/MAPI/default.aspx">MAPI</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/Documentation/default.aspx">Documentation</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/MFCMAPI/default.aspx">MFCMAPI</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>Announcing EWSEditor 1.5!</title><link>http://blogs.msdn.com/stephen_griffin/archive/2009/11/09/announcing-ewseditor-1-5.aspx</link><pubDate>Mon, 09 Nov 2009 20:18:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9919744</guid><dc:creator>Stephen Griffin</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/stephen_griffin/comments/9919744.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stephen_griffin/commentrss.aspx?PostID=9919744</wfw:commentRss><wfw:comment>http://blogs.msdn.com/stephen_griffin/rsscomments.aspx?PostID=9919744</wfw:comment><description>&lt;p&gt;Matt’s very excited about the &lt;a href="http://blogs.msdn.com/mstehle/archive/2009/11/09/announcing-ewseditor-1-5.aspx"&gt;release of EWSEditor&lt;/a&gt;. This tool does for &lt;a href="http://msdn.microsoft.com/en-us/library/dd633709.aspx"&gt;EWS&lt;/a&gt; what &lt;a href="http://mfcmapi.codeplex.com/"&gt;MFCMAPI&lt;/a&gt; does for MAPI. With this tool, Matt does what I did with MFCMAPI and what I recommend to anyone trying to learn a new API: the best way to learn an API is to write tools that use it.&lt;/p&gt;  &lt;p&gt;As you work with EWSEditor, you may notice a few things which are similar to MFCMAPI. This is no coincidence. EWS and MAPI, both designed primarily to interact with an Exchange server, share much of the same object hierarchy, which in turn dictates that tools designed to explore these hierarchies will be similar. Also, since we sit near each other and act as each other’s ad-hoc PMs, we borrow each other’s features. For instance, EWSEditor implements much of the same Smart View parsing as MFCMAPI, using the same logic, recoded from C++ to CSharp.&lt;/p&gt;  &lt;p&gt;Of course, there’s one similarity between EWSEditor and MFCMAPI that has nothing to do with the underlying APIs or fancy features and everything to do with the fact that Matt and I are programmers, not icon designers. Look familiar?&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="EWSEditor" border="0" alt="EWSEditor" src="http://blogs.msdn.com/blogfiles/stephen_griffin/WindowsLiveWriter/AnnouncingEWSEditor1.5_D756/EWSEditor2_3.png" width="36" height="36" /&gt;&lt;/p&gt;  &lt;p&gt;Enjoy! &lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="text-align:right; margin:0px; padding:4px 0px 4px 0px;"&gt;&lt;script type="text/javascript"&gt;digg_url = "http://blogs.msdn.com/stephen_griffin/archive/2009/11/09/announcing-ewseditor-1-5.aspx";digg_title = "Announcing EWSEditor 1.5!";digg_bgcolor = "#FFFFFF";digg_skin = "compact";&lt;/script&gt;&lt;script src="http://digg.com/tools/diggthis.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;digg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined;&lt;/script&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9919744" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/Exchange/default.aspx">Exchange</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/MAPI/default.aspx">MAPI</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/MFCMAPI/default.aspx">MFCMAPI</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/EWS/default.aspx">EWS</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>Inside the PST</title><link>http://blogs.msdn.com/stephen_griffin/archive/2009/10/26/inside-the-pst.aspx</link><pubDate>Mon, 26 Oct 2009 17:12:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9913045</guid><dc:creator>Stephen Griffin</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/stephen_griffin/comments/9913045.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stephen_griffin/commentrss.aspx?PostID=9913045</wfw:commentRss><wfw:comment>http://blogs.msdn.com/stephen_griffin/rsscomments.aspx?PostID=9913045</wfw:comment><description>&lt;p&gt;As &lt;a href="http://community.winsupersite.com/blogs/paul/archive/2009/10/26/microsoft-opens-up-the-pst-format.aspx"&gt;Paul Thurrott&lt;/a&gt; notes, we just announced that we’re &lt;a href="http://blogs.msdn.com/interoperability/archive/2009/10/26/roadmap-for-outlook-personal-folders-pst-documentation.aspx"&gt;documenting the PST file structure&lt;/a&gt;. I haven’t decided yet if I’ll be writing a standalone parser/viewer/validator, but I’m sure I’ll be adding some interesting stuff to &lt;a href="http://mfcmapi.codeplex.com/"&gt;MFCMAPI&lt;/a&gt;. I’ll let you know when I know more.&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="text-align:right; margin:0px; padding:4px 0px 4px 0px;"&gt;&lt;script type="text/javascript"&gt;digg_url = "http://blogs.msdn.com/stephen_griffin/archive/2009/10/26/inside-the-pst.aspx";digg_title = "Inside the PST";digg_bgcolor = "#FFFFFF";digg_skin = "compact";&lt;/script&gt;&lt;script src="http://digg.com/tools/diggthis.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;digg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined;&lt;/script&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9913045" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/Exchange/default.aspx">Exchange</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/Outlook/default.aspx">Outlook</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/MAPI/default.aspx">MAPI</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/Documentation/default.aspx">Documentation</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/PST_2F00_OST/default.aspx">PST/OST</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>Exchange MAPI Download Version 6.5.8131.0</title><link>http://blogs.msdn.com/stephen_griffin/archive/2009/10/20/exchange-mapi-download-version-6-5-8131-0.aspx</link><pubDate>Tue, 20 Oct 2009 13:45:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9909889</guid><dc:creator>Stephen Griffin</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/stephen_griffin/comments/9909889.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stephen_griffin/commentrss.aspx?PostID=9909889</wfw:commentRss><wfw:comment>http://blogs.msdn.com/stephen_griffin/rsscomments.aspx?PostID=9909889</wfw:comment><description>&lt;p&gt;Just had someone ask me what changed in &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=E17E7F31-079A-43A9-BFF2-0A110307611E&amp;amp;displaylang=en"&gt;this version&lt;/a&gt; compared to the last build. Most of the changes were tweaks to various timezones, such as the addition of a timezone for &lt;a href="http://en.wikipedia.org/wiki/Yakutsk"&gt;Yakutsk&lt;/a&gt;, my favorite &lt;a href="http://en.wikipedia.org/wiki/Risk_(game)#territories"&gt;Risk territory&lt;/a&gt;. Additionally, we fixed a problem with &lt;a href="http://support.microsoft.com/kb/961978"&gt;ITnef::AddProps&lt;/a&gt;. You’d only need to worry about the TNEF change if you’re actually calling into the TNEF API directly.&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="text-align:right; margin:0px; padding:4px 0px 4px 0px;"&gt;&lt;script type="text/javascript"&gt;digg_url = "http://blogs.msdn.com/stephen_griffin/archive/2009/10/20/exchange-mapi-download-version-6-5-8131-0.aspx";digg_title = "Exchange MAPI Download Version 6.5.8131.0";digg_bgcolor = "#FFFFFF";digg_skin = "compact";&lt;/script&gt;&lt;script src="http://digg.com/tools/diggthis.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;digg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined;&lt;/script&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9909889" width="1" height="1"&gt;</description></item><item><title>So Long System Attendant Mailbox</title><link>http://blogs.msdn.com/stephen_griffin/archive/2009/10/09/so-long-system-attendant-mailbox.aspx</link><pubDate>Fri, 09 Oct 2009 22:39:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9905586</guid><dc:creator>Stephen Griffin</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/stephen_griffin/comments/9905586.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stephen_griffin/commentrss.aspx?PostID=9905586</wfw:commentRss><wfw:comment>http://blogs.msdn.com/stephen_griffin/rsscomments.aspx?PostID=9905586</wfw:comment><description>&lt;p&gt;&lt;a href="http://blogs.msdn.com/dvespa/default.aspx"&gt;Dave&lt;/a&gt; has a post up about the &lt;a href="http://blogs.msdn.com/dvespa/archive/2009/10/06/say-so-long-to-the-system-attendant-mailbox.aspx"&gt;fate of the System Attendant Mailbox in Exchange 2010&lt;/a&gt;. Since this mailbox isn’t there anymore in 2010, if you have a solution that depended on it, you’ll need to rework it. Dave gives a few suggestions, such as creating your own mailbox/account (the best option since you can then control your exact permission set) or using the &lt;a href="http://blogs.technet.com/evand/archive/2004/12/17/323636.aspx"&gt;System Mailbox&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="text-align:right; margin:0px; padding:4px 0px 4px 0px;"&gt;&lt;script type="text/javascript"&gt;digg_url = "http://blogs.msdn.com/stephen_griffin/archive/2009/10/09/so-long-system-attendant-mailbox.aspx";digg_title = "So Long System Attendant Mailbox";digg_bgcolor = "#FFFFFF";digg_skin = "compact";&lt;/script&gt;&lt;script src="http://digg.com/tools/diggthis.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;digg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined;&lt;/script&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9905586" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/MAPI/default.aspx">MAPI</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/Documentation/default.aspx">Documentation</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/Gotchas/default.aspx">Gotchas</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>Outlook 2010 and Shutting Down Add-Ins</title><link>http://blogs.msdn.com/stephen_griffin/archive/2009/10/05/outlook-2010-and-shutting-down-add-ins.aspx</link><pubDate>Mon, 05 Oct 2009 14:07:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9903235</guid><dc:creator>Stephen Griffin</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/stephen_griffin/comments/9903235.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stephen_griffin/commentrss.aspx?PostID=9903235</wfw:commentRss><wfw:comment>http://blogs.msdn.com/stephen_griffin/rsscomments.aspx?PostID=9903235</wfw:comment><description>&lt;P&gt;Ryan has a new post up about &lt;A href="http://blogs.msdn.com/rgregg/archive/2009/10/02/additional-shutdown-changes-for-outlook-2010-beta.aspx" mce_href="http://blogs.msdn.com/rgregg/archive/2009/10/02/additional-shutdown-changes-for-outlook-2010-beta.aspx"&gt;changes we’re making to Outlook 2010 to make shutdown faster&lt;/A&gt;. These changes are building on the previous changes we made introducing Fast Shutdown. Two key takeaways:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;MAPI Providers now get &lt;A href="http://blogs.msdn.com/stephen_griffin/archive/2009/03/03/fastest-shutdown-in-the-west.aspx" mce_href="http://blogs.msdn.com/stephen_griffin/archive/2009/03/03/fastest-shutdown-in-the-west.aspx"&gt;Fast Shutdown&lt;/A&gt; by default. They may still opt out of Fast Shutdown by implementing &lt;A href="http://msdn.microsoft.com/en-us/library/dd941348(office.14).aspx" mce_href="http://msdn.microsoft.com/en-us/library/dd941348(office.14).aspx"&gt;IMAPIClientShutdown&lt;/A&gt;.&lt;/LI&gt;
&lt;LI&gt;Outlook 2010 will not call the &lt;A href="http://msdn.microsoft.com/en-us/library/extensibility.idtextensibility2.onbeginshutdown(VS.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/extensibility.idtextensibility2.onbeginshutdown(VS.80).aspx"&gt;OnBeginShutdown&lt;/A&gt; or &lt;A href="http://msdn.microsoft.com/en-us/library/extensibility.idtextensibility2.ondisconnection(VS.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/extensibility.idtextensibility2.ondisconnection(VS.80).aspx"&gt;OnDisconnection&lt;/A&gt; of addins during shutdown.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Ryan gives plenty of best practices for rewriting your addins to deal with these changes (and improve the user experience in the process), including policies you can use to revert the changes if you’re an admin and you have add-ins that cannot be rewritten.&lt;/P&gt;
&lt;DIV style="TEXT-ALIGN: right; PADDING-BOTTOM: 4px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 4px" class=wlWriterHeaderFooter&gt;
&lt;SCRIPT type=text/javascript&gt;digg_url = "http://blogs.msdn.com/stephen_griffin/archive/2009/10/05/outlook-2010-and-shutting-down-add-ins.aspx";digg_title = "Outlook 2010 and Shutting Down Add-Ins";digg_bgcolor = "#FFFFFF";digg_skin = "compact";&lt;/SCRIPT&gt;

&lt;SCRIPT type=text/javascript src="http://digg.com/tools/diggthis.js" mce_src="http://digg.com/tools/diggthis.js"&gt;&lt;/SCRIPT&gt;

&lt;SCRIPT type=text/javascript&gt;digg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined;&lt;/SCRIPT&gt;
&lt;/DIV&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9903235" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/Outlook/default.aspx">Outlook</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/MAPI/default.aspx">MAPI</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/Documentation/default.aspx">Documentation</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/Custom+Providers/default.aspx">Custom Providers</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>EnumAccounts Sample and Some New Account Management Props</title><link>http://blogs.msdn.com/stephen_griffin/archive/2009/09/30/enumaccounts-sample-and-some-new-account-management-props.aspx</link><pubDate>Wed, 30 Sep 2009 16:57:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9901309</guid><dc:creator>Stephen Griffin</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/stephen_griffin/comments/9901309.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stephen_griffin/commentrss.aspx?PostID=9901309</wfw:commentRss><wfw:comment>http://blogs.msdn.com/stephen_griffin/rsscomments.aspx?PostID=9901309</wfw:comment><description>&lt;p&gt;A while back, &lt;a href="https://blogs.msdn.com/jasonjoh/archive/2005/12/27/outlook-account-management-api-sample.aspx"&gt;Jason&lt;/a&gt; posted an &lt;a href="http://msdn.microsoft.com/en-us/library/bb821156.aspx"&gt;Account Management API&lt;/a&gt; sample. I’ve &lt;strike&gt;threatened&lt;/strike&gt; &lt;a href="http://blogs.msdn.com/stephen_griffin/archive/2008/07/02/managing-the-outlook-account-management-dialogs.aspx"&gt;promised&lt;/a&gt; before that I would post an update to this sample, and I finally got around to it. You can download the updated sample &lt;a href="http://stephengriffin.members.winisp.net/AccountMgmt/EnumAccounts.zip"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;In addition to adding a –W command to call DisplayAccountList and show the Account Settings Wizard, I’ve also added a couple new properties that dev have decided to document:&lt;/p&gt;  &lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;#define PROP_ACCT_USER_EMAIL_ADDR PROP_TAG(PT_UNICODE, 0x000C)
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;#define PROP_MAPI_IDENTITY_ENTRYID PROP_TAG(PT_BINARY, 0x2002)
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;PROP_ACCT_USER_EMAIL_ADDR is simply the e-mail address for the account, and PROP_MAPI_IDENTITY_ENTRYID is the address book entry ID for the account, similar to what you’d expect from &lt;a href="http://msdn.microsoft.com/en-us/library/cc815657.aspx"&gt;QueryIdentity&lt;/a&gt;. Neither property is expected on every account. For instance, in one profile here, an Exchange account has PROP_MAPI_IDENTITY_ENTRYID but not PROP_ACCT_USER_EMAIL_ADDR, while for an SMTP/POP3 account the situation is reversed.&lt;/p&gt;

&lt;p&gt;Dev also asked me to call out an issue that had tripped some folks up. The function &lt;a href="http://msdn.microsoft.com/en-us/library/bb905091.aspx"&gt;GetIdentity&lt;/a&gt; is supposed to return a string and the length of the string. The returned string should be NULL terminated and the length should include this NULL terminator in the count. We’ll be updating the MSDN to be more explicit about this, in addition to adding the two new properties.&lt;/p&gt;

&lt;p&gt;Some more information about the updated sample: If you’ve been looking for a header for the Account Management API, you can grab and use AcctMgmt.h from this sample. It should have everything you need. Please let me know if it doesn’t. Also, intrepid explorers may want to look at the –I option I added to the sample. It iterates through every possible property tag and requests it, printing the results if it finds something.&lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="text-align:right; margin:0px; padding:4px 0px 4px 0px;"&gt;&lt;script type="text/javascript"&gt;digg_url = "http://blogs.msdn.com/stephen_griffin/archive/2009/09/30/enumaccounts-sample-and-some-new-account-management-props.aspx";digg_title = "EnumAccounts Sample and Some New Account Management Props";digg_bgcolor = "#FFFFFF";digg_skin = "compact";&lt;/script&gt;&lt;script src="http://digg.com/tools/diggthis.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;digg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined;&lt;/script&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9901309" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/Outlook/default.aspx">Outlook</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/MAPI/default.aspx">MAPI</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/Code+Snippet/default.aspx">Code Snippet</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/Documentation/default.aspx">Documentation</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/Outlook+2007+Auxiliary+Reference/default.aspx">Outlook 2007 Auxiliary Reference</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>OpenStreamOnFile vs Unicode Files</title><link>http://blogs.msdn.com/stephen_griffin/archive/2009/09/29/openstreamonfile-vs-unicode-files.aspx</link><pubDate>Tue, 29 Sep 2009 18:26:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9900916</guid><dc:creator>Stephen Griffin</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/stephen_griffin/comments/9900916.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stephen_griffin/commentrss.aspx?PostID=9900916</wfw:commentRss><wfw:comment>http://blogs.msdn.com/stephen_griffin/rsscomments.aspx?PostID=9900916</wfw:comment><description>&lt;P&gt;Let’s take a look at the function &lt;A href="http://msdn.microsoft.com/en-us/library/cc765560(office.14).aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc765560(office.14).aspx"&gt;OpenStreamOnFile&lt;/A&gt;, which is exported by MAPI. Suppose you want to use this function to open a stream on a file that has a Unicode file name. As has been &lt;A href="http://www.tech-archive.net/Archive/Development/microsoft.public.win32.programmer.messaging/2008-06/msg00086.html" mce_href="http://www.tech-archive.net/Archive/Development/microsoft.public.win32.programmer.messaging/2008-06/msg00086.html"&gt;noted&lt;/A&gt; before, this doesn’t work. Why is this? According to the documentation, and according to the header, maputil.h, this function takes two parameters, lpszFileName and lpszPrefix, which are of type LPCTSTR. However, it is impossible for an exported function to take a parameter of this type. Why? Because LPCTSTR is a macro that compiles to either LPCSTR or LPCWSTR depending on whether Unicode was defined in the project. But MAPI’s the same no matter how you compiled your project, so the export won’t change.&lt;/P&gt;
&lt;P&gt;In truth, OpenStreamOnFile should have been declared as taking parameters of type LPCSTR. We’re working on an update to the MSDN and to the &lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyID=f8d01fc8-f7b5-4228-baa3-817488a66db1&amp;amp;displaylang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=f8d01fc8-f7b5-4228-baa3-817488a66db1&amp;amp;displaylang=en"&gt;MAPI Headers&lt;/A&gt; to fix that. We’ll also be documenting a new function, which you can go ahead and use to open files with Unicode names: OpenStreamOnFileW. This is the Unicode version of OpenStreamOnFile which takes Unicode strings. Here’s the signature:&lt;/P&gt;&lt;PRE style="BORDER-BOTTOM: #cecece 1px solid; BORDER-LEFT: #cecece 1px solid; PADDING-BOTTOM: 5px; BACKGROUND-COLOR: #fbfbfb; MIN-HEIGHT: 40px; PADDING-LEFT: 5px; WIDTH: 650px; PADDING-RIGHT: 5px; OVERFLOW: auto; BORDER-TOP: #cecece 1px solid; BORDER-RIGHT: #cecece 1px solid; PADDING-TOP: 5px"&gt;&lt;PRE style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;STDMETHODIMP OpenStreamOnFileW(
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;   LPALLOCATEBUFFER lpAllocateBuffer,
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;   LPFREEBUFFER lpFreeBuffer,
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;   ULONG ulFlags,
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;   __in LPCWSTR lpszFileName,
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;   __in_opt LPCWSTR lpszPrefix,
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;   LPSTREAM FAR * lppStream);
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;typedef&lt;/SPAN&gt; HRESULT (STDMETHODCALLTYPE FAR * LPOPENSTREAMONFILEW) (
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;   LPALLOCATEBUFFER lpAllocateBuffer,
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;   LPFREEBUFFER lpFreeBuffer,
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;   ULONG ulFlags,
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;   __in LPCWSTR lpszFileName,
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;   __in_opt LPCWSTR lpszPrefix,
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;   LPSTREAM FAR * lppStream);
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;&lt;/PRE&gt;&lt;/PRE&gt;
&lt;P&gt;Other than the change to the strings, the function is identical to OpenStreamOnFile. Officially, we’re only documenting this function for Outlook 2010 and higher, but the function is also there in Outlook 2003 and 2007. The &lt;A href="http://www.microsoft.com/downloads/details.aspx?familyid=E17E7F31-079A-43A9-BFF2-0A110307611E&amp;amp;displaylang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?familyid=E17E7F31-079A-43A9-BFF2-0A110307611E&amp;amp;displaylang=en"&gt;Exchange MAPI Download&lt;/A&gt; does not implement OpenStreamOnFileW at all.&lt;/P&gt;
&lt;P&gt;The November build of MFCMAPI is being augmented to handle Unicode file names. Part of that rewrite is that MFCMAPI will use OpenStreamOnFileW if it’s available, and fall back to OpenStreamOnFile if it’s not.&lt;/P&gt;
&lt;P&gt;Enjoy!&lt;/P&gt;
&lt;DIV style="TEXT-ALIGN: right; PADDING-BOTTOM: 4px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 4px" class=wlWriterHeaderFooter&gt;
&lt;SCRIPT type=text/javascript&gt;digg_url = "http://blogs.msdn.com/stephen_griffin/archive/2009/09/29/openstreamonfile-vs-unicode-files.aspx";digg_title = "OpenStreamOnFile vs Unicode Files";digg_bgcolor = "#FFFFFF";digg_skin = "compact";&lt;/SCRIPT&gt;

&lt;SCRIPT type=text/javascript src="http://digg.com/tools/diggthis.js" mce_src="http://digg.com/tools/diggthis.js"&gt;&lt;/SCRIPT&gt;

&lt;SCRIPT type=text/javascript&gt;digg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined;&lt;/SCRIPT&gt;
&lt;/DIV&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9900916" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/Outlook/default.aspx">Outlook</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/MAPI/default.aspx">MAPI</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/Documentation/default.aspx">Documentation</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/MFCMAPI/default.aspx">MFCMAPI</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>Detecting Sharepoint PSTs</title><link>http://blogs.msdn.com/stephen_griffin/archive/2009/09/28/detecting-sharepoint-psts.aspx</link><pubDate>Mon, 28 Sep 2009 19:58:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9900347</guid><dc:creator>Stephen Griffin</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/stephen_griffin/comments/9900347.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stephen_griffin/commentrss.aspx?PostID=9900347</wfw:commentRss><wfw:comment>http://blogs.msdn.com/stephen_griffin/rsscomments.aspx?PostID=9900347</wfw:comment><description>&lt;p&gt;We had a customer recently who was asking how to tell a PST had been configured as a Sharepoint PST, so they could exclude it from some processing they were doing. After some digging, I found the property that Outlook itself uses to determine a PST is a Sharepoint PST, and development gave me permission to document it:&lt;/p&gt;  &lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 458px; padding-right: 5px; height: 2px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 70.79%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; height: 16px; font-size: 12px"&gt;#define PR_ASSOCIATED_SHARING_PROVIDER PROP_TAG(PT_CLSID, 0x0EA0)&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;To check if a PST is a Sharepoint PST, mount the PST using &lt;a href="http://msdn.microsoft.com/en-us/library/cc842103.aspx"&gt;OpenMsgStore&lt;/a&gt;, then call &lt;a href="http://msdn.microsoft.com/en-us/library/cc765749.aspx"&gt;GetProps&lt;/a&gt; on the message store object requesting this property. If it exists, you can assume the PST has been configured for Sharepoint. If it doesn’t exist, the PST has not been configured as a Sharepoint PST.&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="text-align:right; margin:0px; padding:4px 0px 4px 0px;"&gt;&lt;script type="text/javascript"&gt;digg_url = "http://blogs.msdn.com/stephen_griffin/archive/2009/09/28/detecting-sharepoint-psts.aspx";digg_title = "Detecting Sharepoint PSTs";digg_bgcolor = "#FFFFFF";digg_skin = "compact";&lt;/script&gt;&lt;script src="http://digg.com/tools/diggthis.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;digg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined;&lt;/script&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9900347" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/Outlook/default.aspx">Outlook</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/MAPI/default.aspx">MAPI</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/Documentation/default.aspx">Documentation</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/PST_2F00_OST/default.aspx">PST/OST</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>September 2009 Release of MFCMAPI</title><link>http://blogs.msdn.com/stephen_griffin/archive/2009/09/10/september-2009-release-of-mfcmapi.aspx</link><pubDate>Thu, 10 Sep 2009 23:48:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9893871</guid><dc:creator>Stephen Griffin</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/stephen_griffin/comments/9893871.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stephen_griffin/commentrss.aspx?PostID=9893871</wfw:commentRss><wfw:comment>http://blogs.msdn.com/stephen_griffin/rsscomments.aspx?PostID=9893871</wfw:comment><description>&lt;p&gt;The September 2009 Release (build 6.0.0.1015) is live: &lt;a href="http://mfcmapi.codeplex.com"&gt;http://mfcmapi.codeplex.com&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;The July 2009 release was downloaded over 13 thousand times, with nearly 1700 of them being the 64 bit build. This was the most popular release yet – retiring MAPI Editor drove a lot of traffic over to codeplex.&lt;/p&gt;  &lt;p&gt;I did a lot of work on the property and hex editors this time around. The property editor should be much better at editing large and complex streams you’ll find in PR_BODY or PR_RTF_COMPRESSED. And the Hex Editor is no longer modal! Now maybe &lt;a href="http://blogs.msdn.com/rickhall/"&gt;Rick&lt;/a&gt; will stop bugging me about it.&lt;/p&gt;  &lt;p&gt;Here's a change list - see the &lt;a href="http://www.codeplex.com/MFCMAPI/WorkItem/List.aspx"&gt;Issue Tracker&lt;/a&gt; on Codeplex for more details, or look at the code:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Ctrl+H will now bring up a non-modal Hex Editor&lt;/li&gt;    &lt;li&gt;That “Sample version” text is now gone. There is only one version of MFCMAPI, and it’s what you get on &lt;a href="http://mfcmapi.codeplex.com"&gt;codeplex&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;Embedded NULLs in strings no longer break the property and stream editors&lt;/li&gt;    &lt;li&gt;All the editors (hex, property, stream) should be able to handle MUCH larger strings now&lt;/li&gt;    &lt;li&gt;Smart View: Added parsing for PR_ADDITIONAL_REN_ENTRYIDS, &lt;a href="http://msdn.microsoft.com/en-us/library/ee415119(office.14).aspx"&gt;dispidPropDefStream&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;Smart View: Added framework for Smart View parsing of multivalued properties, and added a bunch of previously unparsed properties.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Enjoy.&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="text-align:right; margin:0px; padding:4px 0px 4px 0px;"&gt;&lt;script type="text/javascript"&gt;digg_url = "http://blogs.msdn.com/stephen_griffin/archive/2009/09/10/september-2009-release-of-mfcmapi.aspx";digg_title = "September 2009 Release of MFCMAPI";digg_bgcolor = "#FFFFFF";digg_skin = "compact";&lt;/script&gt;&lt;script src="http://digg.com/tools/diggthis.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;digg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined;&lt;/script&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9893871" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/MAPI/default.aspx">MAPI</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/MFCMAPI/default.aspx">MFCMAPI</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>Exchange 2010 and the MAPI Download</title><link>http://blogs.msdn.com/stephen_griffin/archive/2009/09/02/exchange-2010-and-the-mapi-download.aspx</link><pubDate>Wed, 02 Sep 2009 21:06:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9890508</guid><dc:creator>Stephen Griffin</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/stephen_griffin/comments/9890508.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stephen_griffin/commentrss.aspx?PostID=9890508</wfw:commentRss><wfw:comment>http://blogs.msdn.com/stephen_griffin/rsscomments.aspx?PostID=9890508</wfw:comment><description>&lt;p&gt;Bunches of people have contacted me asking if the MAPI download works with Exchange 2010. My usual response has been that I know it works, but you have to tweak the profile. I didn’t know the specific tweaks ‘cause I hadn’t looked in to it.&lt;/p&gt;  &lt;p&gt;Dave Vespa just &lt;a href="http://blogs.msdn.com/dvespa/archive/2009/09/02/how-to-configure-a-mapi-profile-to-connect-to-exchange-2010.aspx"&gt;blogged those tweaks&lt;/a&gt;. Note that they’re very similar to the modifications we use with Exchange 2007 to get referral working. Also note that the profile Dave builds is not referral enabled, but this doesn’t matter any more. With Exchange 2010, MAPI always talks to the Client Access Server for both mailbox and directory. The dreaded DSProxy that we were trying to avoid in 2007 and earlier has been replaced by the &lt;a href="http://microsoftblog.globalknowledge.com/2009/07/27/cas-role-matures-in-exchange-2010/"&gt;Address Book Service&lt;/a&gt;, which is pretty much what DSProxy should have been.&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="text-align:right; margin:0px; padding:4px 0px 4px 0px;"&gt;&lt;script type="text/javascript"&gt;digg_url = "http://blogs.msdn.com/stephen_griffin/archive/2009/09/02/exchange-2010-and-the-mapi-download.aspx";digg_title = "Exchange 2010 and the MAPI Download";digg_bgcolor = "#FFFFFF";digg_skin = "compact";&lt;/script&gt;&lt;script src="http://digg.com/tools/diggthis.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;digg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined;&lt;/script&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9890508" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/Exchange/default.aspx">Exchange</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/MAPI/default.aspx">MAPI</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/MFCMAPI/default.aspx">MFCMAPI</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/MAPI+Download/default.aspx">MAPI Download</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>Outlook 2010 MAPI Reference Updated</title><link>http://blogs.msdn.com/stephen_griffin/archive/2009/08/31/outlook-2010-mapi-reference-updated.aspx</link><pubDate>Tue, 01 Sep 2009 00:01:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9889535</guid><dc:creator>Stephen Griffin</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/stephen_griffin/comments/9889535.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stephen_griffin/commentrss.aspx?PostID=9889535</wfw:commentRss><wfw:comment>http://blogs.msdn.com/stephen_griffin/rsscomments.aspx?PostID=9889535</wfw:comment><description>&lt;p&gt;The Outlook 2010 MAPI Reference has been updated. I don’t have a list of everything that changed, so I’ll highlight one addition that’s pretty cool: &lt;a href="http://msdn.microsoft.com/en-us/library/ee415110(office.14).aspx"&gt;the property definition stream&lt;/a&gt;. Long time readers might remember I mentioned this property before – it’s one of the properties you want to delete &lt;a href="http://blogs.msdn.com/stephen_griffin/archive/2005/12/29/new-outlook-documentation-part-5-one-off-forms.aspx"&gt;to kill a one-off form&lt;/a&gt;. It’s also the property that Outlook uses to store information about named properties created via the Object model and the user interface. &lt;/p&gt;  &lt;p&gt;Now that the format of &lt;a href="http://msdn.microsoft.com/en-us/library/ee415119(office.14).aspx"&gt;PidLidPropertyDefinitionStream&lt;/a&gt; is documented, you can create new user defined properties using MAPI and have them show up in the UI! The September release of MFCMAPI (which I’m furiously hammering on) will be able to parse this property.&lt;/p&gt;  &lt;p&gt;As usual, the documentation is also available for &lt;a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=5f61a276-9c09-4c82-9b80-20dccad17a2a"&gt;download&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="text-align:right; margin:0px; padding:4px 0px 4px 0px;"&gt;&lt;script type="text/javascript"&gt;digg_url = "http://blogs.msdn.com/stephen_griffin/archive/2009/08/31/outlook-2010-mapi-reference-updated.aspx";digg_title = "Outlook 2010 MAPI Reference Updated";digg_bgcolor = "#FFFFFF";digg_skin = "compact";&lt;/script&gt;&lt;script src="http://digg.com/tools/diggthis.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;digg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined;&lt;/script&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9889535" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/Outlook/default.aspx">Outlook</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/MAPI/default.aspx">MAPI</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/Documentation/default.aspx">Documentation</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/MFCMAPI/default.aspx">MFCMAPI</category><category domain="http://blogs.msdn.com/stephen_griffin/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item></channel></rss>