<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Wiz/dumb</title><subtitle type="html">Messaging development spouts and findings.</subtitle><id>http://blogs.msdn.com/b/pcreehan/atom.aspx</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/pcreehan/" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/b/pcreehan/atom.aspx" /><generator uri="http://telligent.com" version="5.6.50428.7875">Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><updated>2010-02-01T16:25:24Z</updated><entry><title>How to Build an Outlook Social Connector Provider</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/pcreehan/archive/2011/01/27/how-to-build-an-outlook-social-connector-provider.aspx" /><id>http://blogs.msdn.com/b/pcreehan/archive/2011/01/27/how-to-build-an-outlook-social-connector-provider.aspx</id><published>2011-01-27T13:34:53Z</published><updated>2011-01-27T13:34:53Z</updated><content type="html">&lt;p&gt;Last fall, the Outlook documentation team approached me about using an Outlook Social Connector provider I built for an internal social network we have here at Microsoft (called OfficeTalk) as an example for a Visual How-To series on MSDN. It took a few months to get it all done, but you can check out the series here: &lt;a title="Developing a Real Outlook Social Connector Provider" href="http://msdn.microsoft.com/en-us/library/gg585217.aspx"&gt;Developing a Real Outlook Social Connector Provider&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10120982" width="1" height="1"&gt;</content><author><name>pcreehan1</name><uri>http://blogs.msdn.com/pcreehan/ProfileUrlRedirect.ashx</uri></author><category term="Outlook" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/Outlook/" /><category term="Outlook 2007" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/Outlook+2007/" /><category term=".NET" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/-NET/" /><category term="DevMsgTeam" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/DevMsgTeam/" /><category term="Outlook 2010" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/Outlook+2010/" /><category term="Outlook Social Connector" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/Outlook+Social+Connector/" /><category term="OSC" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/OSC/" /></entry><entry><title>Office 2010 PIAs Are Now Available</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/pcreehan/archive/2010/09/08/office-2010-pias-are-now-available.aspx" /><id>http://blogs.msdn.com/b/pcreehan/archive/2010/09/08/office-2010-pias-are-now-available.aspx</id><published>2010-09-08T17:42:18Z</published><updated>2010-09-08T17:42:18Z</updated><content type="html">&lt;p&gt;The Office 2010 PIAs are finally available for download:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=938fe8ad-583b-4bd7-a345-23250dc15855" href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=938fe8ad-583b-4bd7-a345-23250dc15855"&gt;http://www.microsoft.com/downloads/en/details.aspx?FamilyID=938fe8ad-583b-4bd7-a345-23250dc15855&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10059424" width="1" height="1"&gt;</content><author><name>pcreehan1</name><uri>http://blogs.msdn.com/pcreehan/ProfileUrlRedirect.ashx</uri></author><category term="Outlook" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/Outlook/" /><category term="Outlook Object Model" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/Outlook+Object+Model/" /><category term=".NET" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/-NET/" /><category term="DevMsgTeam" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/DevMsgTeam/" /><category term="Outlook 2010" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/Outlook+2010/" /></entry><entry><title>RPC_S_UNKNOWN_IF When Calling IDataSource.SaveTo in CDOEX on Exchange 2007</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/pcreehan/archive/2010/08/26/rpc-s-unknown-if-when-calling-idatasource-saveto-in-cdoex-on-exchange-2007.aspx" /><id>http://blogs.msdn.com/b/pcreehan/archive/2010/08/26/rpc-s-unknown-if-when-calling-idatasource-saveto-in-cdoex-on-exchange-2007.aspx</id><published>2010-08-26T13:26:38Z</published><updated>2010-08-26T13:26:38Z</updated><content type="html">&lt;p&gt;We’ve been seeing some cases over the past year where customers are using CDOEX or EXOLEDB in managed code on Windows Server 2008 and Exchange 2007 and are randomly getting RPC_S_UNKNOWN_IF (0x800706B5) errors. The issue only seems to occur under load. The same code worked fine on Windows Server 2003. &lt;/p&gt;  &lt;p&gt;While we still don’t know the root cause, here’s essentially what’s going wrong: In the Exchange Information Store (“store”) we have our COM server for EXOLEDB which services remote calls to it’s interfaces. When you call SaveToContainer or SaveTo, under the hood, CDOEX leverages the ITransactionLocal interface of its OLEDB implementation to do a transactional commit to the store. If you have lots of these transactions going on, &lt;em&gt;at some point&lt;/em&gt; what happens is that you release a reference to one of these objects and that drops the ref count on the store-side to 0. Shortly after that, if msado15 is loaded into store, the COM subsystem running in store will ask all the COM DLLs if they’re ready to unload. MSADO15 (which also implements ITransactionLocal) answers “yes” and is unloaded. As part of that process, it unregisters the ITransactionLocal interface from RPC and the next call your client makes on that interface fails with the above error. You’d have to restart the store to get back to a good state. What has made this so tricky is that all the release calls look valid and appropriate. When you’re talking about a scenario that only occurs under load, you’re talking about a &lt;em&gt;lot&lt;/em&gt; of release calls. It’s the proverbial needle-in-a-haystack.&lt;/p&gt;  &lt;p&gt;So what do you do? &lt;/p&gt;  &lt;p&gt;Here are a few options from most immediate relief to more long-term:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Have that guy you hate keep open the Services mmc on his machine and restart store when it starts returning this error.&lt;/li&gt;    &lt;li&gt;Move your mailbox servers back onto Windows 2003 – we haven’t seen this problem on that OS. As an aside, we also haven’t seen it on Windows Server 2008 R2, but that may be due to the fact that Exchange 2007 wasn’t supported on R2 until Exchange 2007 SP3 was released in June 2010. So it may just be a matter of time.&lt;/li&gt;    &lt;li&gt;Migrate your code to use Exchange Web Services (EWS) instead.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Choosing option number 3 is probably your best option for the long term. For one, that guy you hate might go postal if he has to man the Services console for too long. For two, we never recommend as a rule that you should go back to a previous version of a product simply because you lose out on the great security and feature enhancements of the more recent version. That leaves number three, which should be something on your future plan list anyway.&lt;/p&gt;  &lt;p&gt;CDOEX along with all the other web store technologies like WebDAV and EXOLEDB don’t even exist in Exchange 2010 and beyond so your application can’t work against the current and future versions of Exchange. These technologies were deemphasized in Exchange 2007 which makes it very difficult to get the product team to agree to invest time creating a fix – especially when the workaround is “easy” (use EWS instead). Your only option is to use EWS in place of your CDOEX code. This does a few things for you. You can support Exchange 2007 and beyond using a highly tested and powerful technology. You now have the option (and it’s recommended) to run your application on a different server than your Exchange Server. Exchange admins will love this. As I mentioned, I’m sure all of you were planning to move to EWS for Exchange 2010 anyway, maybe this problem just pushes those plans up on the list a bit. &lt;/p&gt;  &lt;p&gt;Are any of you using CDOEX and getting this error? If so, do you have a consistent repro (the shorter and simpler the better)? If you’re moving your CDOEX code to EWS and have questions about how to do in EWS what you’re currently doing in CDOEX, lets hear them!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10054603" width="1" height="1"&gt;</content><author><name>pcreehan1</name><uri>http://blogs.msdn.com/pcreehan/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>OSC Provider Proxy Library Updated</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/pcreehan/archive/2010/07/20/osc-provider-proxy-library-updated.aspx" /><id>http://blogs.msdn.com/b/pcreehan/archive/2010/07/20/osc-provider-proxy-library-updated.aspx</id><published>2010-07-21T03:04:02Z</published><updated>2010-07-21T03:04:02Z</updated><content type="html">&lt;p&gt;You may remember when I &lt;a href="http://blogs.msdn.com/b/pcreehan/archive/2010/04/12/introducing-the-outlook-social-connector-provider-proxy-library.aspx" target="_blank"&gt;unveiled&lt;/a&gt; the Outlook Social Connector Provider Proxy. Well, good news – I have updated the &lt;a href="https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=oscprovider&amp;amp;ReleaseId=4652" target="_blank"&gt;OSC Provider Proxy Library&lt;/a&gt; to now support OSC v1.1 and also built it for .NET v3.5 in addition to the v4.0 build available with the original release. Check it out!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10040714" width="1" height="1"&gt;</content><author><name>pcreehan1</name><uri>http://blogs.msdn.com/pcreehan/ProfileUrlRedirect.ashx</uri></author><category term="Outlook" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/Outlook/" /><category term="Outlook 2007" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/Outlook+2007/" /><category term="DevMsgTeam" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/DevMsgTeam/" /><category term="Outlook 2010" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/Outlook+2010/" /><category term="Outlook Social Connector" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/Outlook+Social+Connector/" /><category term="OSC" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/OSC/" /></entry><entry><title>Neither Silverlight 3 nor 4 Work on Outlook Folder Homepages</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/pcreehan/archive/2010/06/30/silverlight-3-and-4-doesn-t-work-on-outlook-folder-homepages.aspx" /><id>http://blogs.msdn.com/b/pcreehan/archive/2010/06/30/silverlight-3-and-4-doesn-t-work-on-outlook-folder-homepages.aspx</id><published>2010-06-30T13:22:00Z</published><updated>2010-06-30T13:22:00Z</updated><content type="html">&lt;p&gt;Starting in Silverlight 3, the algorithm that SL uses to determine the hosting URL of the SL control doesn&amp;rsquo;t work properly when the page is viewed as part of an Outlook Folder Home Page. This is actually a &lt;a target="_blank" href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=535737&amp;amp;wa=wsignin1.0"&gt;known issue&lt;/a&gt; and is being looked at for Silverlight 5 but was not discovered early enough to make it into Silverlight 4.&lt;/p&gt;
&lt;p&gt;If you are developing a solution that includes the use of Outlook Folder Home Pages, I&amp;rsquo;d recommend you consider another option if you plan on doing any advanced things in your solution. Folder homepages are good for hosting plain ol&amp;rsquo; HTML and an occasional Outlook View Control, but because of the security lock-downs that are added in each new version of Outlook, the flexibility you have for using various techniques inside OFHPs is limited. Depending on what you are trying to accomplish, you may want to consider using Form Regions and Ribbon customization or else simply providing a link to your high-complexity web page instead of providing the content inside Outlook itself.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10032788" width="1" height="1"&gt;</content><author><name>pcreehan1</name><uri>http://blogs.msdn.com/pcreehan/ProfileUrlRedirect.ashx</uri></author><category term="Outlook" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/Outlook/" /><category term="Outlook 2007" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/Outlook+2007/" /><category term="DevMsgTeam" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/DevMsgTeam/" /><category term="Outlook 2010" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/Outlook+2010/" /><category term="Silverlight" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/Silverlight/" /></entry><entry><title>Moving your apps to Office 2010</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/pcreehan/archive/2010/06/15/moving-your-apps-to-office-2010.aspx" /><id>http://blogs.msdn.com/b/pcreehan/archive/2010/06/15/moving-your-apps-to-office-2010.aspx</id><published>2010-06-15T12:36:12Z</published><updated>2010-06-15T12:36:12Z</updated><content type="html">&lt;p&gt;The Office team put out some Channel9 videos and some tools to help you get your add-ins and applications onto the Office 2010 platform.&lt;/p&gt;  &lt;p&gt;&lt;a title="http://channel9.msdn.com/learn/courses/Office2010/AppCompatUnit/" href="http://channel9.msdn.com/learn/courses/Office2010/AppCompatUnit/"&gt;http://channel9.msdn.com/learn/courses/Office2010/AppCompatUnit/&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10025127" width="1" height="1"&gt;</content><author><name>pcreehan1</name><uri>http://blogs.msdn.com/pcreehan/ProfileUrlRedirect.ashx</uri></author><category term="Outlook" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/Outlook/" /><category term="Outlook Object Model" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/Outlook+Object+Model/" /><category term=".NET" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/-NET/" /><category term="DevMsgTeam" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/DevMsgTeam/" /><category term="Outlook 2010" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/Outlook+2010/" /></entry><entry><title>Rude Operator</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/pcreehan/archive/2010/06/09/rude-operator.aspx" /><id>http://blogs.msdn.com/b/pcreehan/archive/2010/06/09/rude-operator.aspx</id><published>2010-06-09T22:10:38Z</published><updated>2010-06-09T22:10:38Z</updated><content type="html">&lt;p&gt;If you are automating Outlook in a standalone application or other app outside of Outlook and have trouble on some machines with your CreateObject call succeeding when Outlook is not already running, this article may be for you.&lt;/p&gt;  &lt;p&gt;Have you ever called someone only to be put on hold as soon as they answer? Do you hang up immediately, or do you hold on for a few minutes to see if they pick up? If you’ve ever ordered a pizza where I order mine, I &lt;em&gt;know&lt;/em&gt; you’ve experienced this. Well, it turns out, Outlook [or any Office application for that matter] acts just like this rude operator. When you try to automate Outlook, the Outlook.exe process has to be running in order to serve your requests. Outlook is what’s called a COM server. So your call to CreateObject (or &amp;quot;new”) makes a call into the COM subsystem which does the work of spinning up an instance of Outlook for you to work from using the –Embedding switch which tells Outlook not to display any UI by default. Part of Outlook’s start up logic involves loading all the COM add-ins and calling into the OnConnect and OnStartupComplete events. This is where things could go badly for you.&lt;/p&gt;  &lt;p&gt;If your user is an comaddinophile they may have some add-ins installed that take a looooooong time to load. They may be calling into a database or a webservice or just have really poor code that takes a long time to execute. Outlook does all this work on its main thread – they aren’t spun off to a background thread – so all the time it takes for these add-ins to load and run is time the COM subsystem is spending growing very impatient. It can, after a while, just time out or it could succeed the initial load, but if Outlook is busy handling other requests your call to get the Application dispatch object could be actively refused because Outlook is blocking. In these cases, you could end up with a RPC_E_SERVERCALL_RETRYLATER error bubbling up in your .net automation code. The error you get will be something like “Call was rejected by callee.”&lt;/p&gt;  &lt;p&gt;Oftentimes, you can follow up your failed CreateObject call with a second one and it succeeds because at this time Outlook.exe is running and may be unblocked and ready to service your request. However, it may just block again. In these cases, you will need to implement an IMessageFilter to be able to tell the COM subsystem that you’re ok waiting and to keep retrying your call until it succeeds or you get a different error. &lt;/p&gt;  &lt;p&gt;The best &lt;a href="http://msdn.microsoft.com/en-us/library/ms228772.aspx" target="_blank"&gt;sample&lt;/a&gt; I found for this was describing implementing this to solve this same problem when doing Visual Studio automation, but the same logic applies. Andrew Whitechapel wrote a &lt;a href="http://blogs.msdn.com/b/andreww/archive/2008/11/19/implementing-imessagefilter-in-an-office-add-in.aspx" target="_blank"&gt;sample&lt;/a&gt; also. In his case he was describing a similar problem when you try to make object model calls on a background thread from an add-in. Here’s a VB.NET sample I wrote.&lt;/p&gt;  &lt;p&gt;   &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:c5632395-79fb-421a-a3a9-f12275cd28c1" class="wlWriterEditableSmartContent"&gt; &lt;div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"&gt; &lt;div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"&gt;&lt;span style="color:#0000ff"&gt;Public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Class&lt;/span&gt; &lt;span style="color:#2b91af"&gt;MessageFilter&lt;/span&gt;&lt;br /&gt;     &lt;span style="color:#0000ff"&gt;Implements&lt;/span&gt; &lt;span style="color:#2b91af"&gt;IOleMessageFilter&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;     &lt;span style="color:#0000ff"&gt;Public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Shared&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Sub&lt;/span&gt; Register()&lt;br /&gt;         &lt;span style="color:#0000ff"&gt;Dim&lt;/span&gt; newFilter &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; &lt;span style="color:#2b91af"&gt;IOleMessageFilter&lt;/span&gt; = &lt;span style="color:#0000ff"&gt;New&lt;/span&gt; &lt;span style="color:#2b91af"&gt;MessageFilter&lt;/span&gt;()&lt;br /&gt;         &lt;span style="color:#0000ff"&gt;Dim&lt;/span&gt; oldFilter &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; &lt;span style="color:#2b91af"&gt;IOleMessageFilter&lt;/span&gt; = &lt;span style="color:#0000ff"&gt;Nothing&lt;/span&gt;&lt;br /&gt;         CoRegisterMessageFilter(newFilter, oldFilter)&lt;br /&gt;     &lt;span style="color:#0000ff"&gt;End&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Sub&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;     &lt;span style="color:#0000ff"&gt;Public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Shared&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Sub&lt;/span&gt; Revoke()&lt;br /&gt;         &lt;span style="color:#0000ff"&gt;Dim&lt;/span&gt; oldFilter &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; &lt;span style="color:#2b91af"&gt;IOleMessageFilter&lt;/span&gt; = &lt;span style="color:#0000ff"&gt;Nothing&lt;/span&gt;&lt;br /&gt;         CoRegisterMessageFilter(&lt;span style="color:#0000ff"&gt;Nothing&lt;/span&gt;, oldFilter)&lt;br /&gt;     &lt;span style="color:#0000ff"&gt;End&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Sub&lt;/span&gt;&lt;br /&gt;     &lt;span style="color:#0000ff"&gt;Public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Function&lt;/span&gt; HandleInComingCall(&lt;span style="color:#0000ff"&gt;ByVal&lt;/span&gt; dwCallType &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Integer&lt;/span&gt;, &lt;span style="color:#0000ff"&gt;ByVal&lt;/span&gt; hTaskCaller &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; System.&lt;span style="color:#2b91af"&gt;IntPtr&lt;/span&gt;, &lt;span style="color:#0000ff"&gt;ByVal&lt;/span&gt; dwTickCount &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Integer&lt;/span&gt;, &lt;span style="color:#0000ff"&gt;ByVal&lt;/span&gt; lpInterfaceInfo &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; System.&lt;span style="color:#2b91af"&gt;IntPtr&lt;/span&gt;) &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Integer&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Implements&lt;/span&gt; &lt;span style="color:#2b91af"&gt;IOleMessageFilter&lt;/span&gt;.HandleInComingCall&lt;br /&gt;         &lt;span style="color:#0000ff"&gt;Return&lt;/span&gt; 0&lt;br /&gt;     &lt;span style="color:#0000ff"&gt;End&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Function&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;     &lt;span style="color:#0000ff"&gt;Public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Function&lt;/span&gt; MessagePending(&lt;span style="color:#0000ff"&gt;ByVal&lt;/span&gt; hTaskCallee &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; System.&lt;span style="color:#2b91af"&gt;IntPtr&lt;/span&gt;, &lt;span style="color:#0000ff"&gt;ByVal&lt;/span&gt; dwTickCount &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Integer&lt;/span&gt;, &lt;span style="color:#0000ff"&gt;ByVal&lt;/span&gt; dwPendingType &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Integer&lt;/span&gt;) &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Integer&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Implements&lt;/span&gt; &lt;span style="color:#2b91af"&gt;IOleMessageFilter&lt;/span&gt;.MessagePending&lt;br /&gt;         &lt;span style="color:#0000ff"&gt;Return&lt;/span&gt; 2&lt;br /&gt;     &lt;span style="color:#0000ff"&gt;End&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Function&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;     &lt;span style="color:#0000ff"&gt;Public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Function&lt;/span&gt; RetryRejectedCall(&lt;span style="color:#0000ff"&gt;ByVal&lt;/span&gt; hTaskCallee &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; System.&lt;span style="color:#2b91af"&gt;IntPtr&lt;/span&gt;, &lt;span style="color:#0000ff"&gt;ByVal&lt;/span&gt; dwTickCount &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Integer&lt;/span&gt;, &lt;span style="color:#0000ff"&gt;ByVal&lt;/span&gt; dwRejectType &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Integer&lt;/span&gt;) &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Integer&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Implements&lt;/span&gt; &lt;span style="color:#2b91af"&gt;IOleMessageFilter&lt;/span&gt;.RetryRejectedCall&lt;br /&gt;         &lt;span style="color:#0000ff"&gt;If&lt;/span&gt; (dwRejectType = 2) &lt;span style="color:#0000ff"&gt;Then&lt;/span&gt;&lt;br /&gt;             &lt;span style="color:#0000ff"&gt;Return&lt;/span&gt; 99&lt;br /&gt;         &lt;span style="color:#0000ff"&gt;Else&lt;/span&gt;&lt;br /&gt;             &lt;span style="color:#0000ff"&gt;Return&lt;/span&gt; -1&lt;br /&gt;         &lt;span style="color:#0000ff"&gt;End&lt;/span&gt; &lt;span style="color:#0000ff"&gt;If&lt;/span&gt;&lt;br /&gt;     &lt;span style="color:#0000ff"&gt;End&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Function&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;     &amp;lt;&lt;span style="color:#2b91af"&gt;DllImport&lt;/span&gt;(&lt;span style="color:#a31515"&gt;&amp;quot;Ole32.dll&amp;quot;&lt;/span&gt;)&amp;gt;&lt;br /&gt;     &lt;span style="color:#0000ff"&gt;Private&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Shared&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Function&lt;/span&gt; CoRegisterMessageFilter(&lt;span style="color:#0000ff"&gt;ByVal&lt;/span&gt; newFilter &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; &lt;span style="color:#2b91af"&gt;IOleMessageFilter&lt;/span&gt;, &lt;span style="color:#0000ff"&gt;ByRef&lt;/span&gt; oldFilter &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; &lt;span style="color:#2b91af"&gt;IOleMessageFilter&lt;/span&gt;) &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Integer&lt;/span&gt;&lt;br /&gt;     &lt;span style="color:#0000ff"&gt;End&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Function&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &lt;span style="color:#0000ff"&gt;End&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Class&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &amp;lt;&lt;span style="color:#2b91af"&gt;ComImport&lt;/span&gt;(), &lt;span style="color:#2b91af"&gt;Guid&lt;/span&gt;(&lt;span style="color:#a31515"&gt;&amp;quot;00000016-0000-0000-C000-000000000046&amp;quot;&lt;/span&gt;),&lt;br /&gt;     &lt;span style="color:#2b91af"&gt;InterfaceTypeAttribute&lt;/span&gt;(&lt;span style="color:#2b91af"&gt;ComInterfaceType&lt;/span&gt;.InterfaceIsIUnknown)&amp;gt;&lt;br /&gt; &lt;span style="color:#0000ff"&gt;Public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Interface&lt;/span&gt; &lt;span style="color:#2b91af"&gt;IOleMessageFilter&lt;/span&gt;&lt;br /&gt;     &amp;lt;&lt;span style="color:#2b91af"&gt;PreserveSig&lt;/span&gt;()&amp;gt;&lt;br /&gt;     &lt;span style="color:#0000ff"&gt;Function&lt;/span&gt; HandleInComingCall(&lt;br /&gt;                                &lt;span style="color:#0000ff"&gt;ByVal&lt;/span&gt; dwCallType &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Integer&lt;/span&gt;,&lt;br /&gt;                                &lt;span style="color:#0000ff"&gt;ByVal&lt;/span&gt; hTaskCaller &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; &lt;span style="color:#2b91af"&gt;IntPtr&lt;/span&gt;,&lt;br /&gt;                                &lt;span style="color:#0000ff"&gt;ByVal&lt;/span&gt; dwTickCount &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Integer&lt;/span&gt;,&lt;br /&gt;                                &lt;span style="color:#0000ff"&gt;ByVal&lt;/span&gt; lpInterfaceInfo &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; &lt;span style="color:#2b91af"&gt;IntPtr&lt;/span&gt;) &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Integer&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;     &amp;lt;&lt;span style="color:#2b91af"&gt;PreserveSig&lt;/span&gt;()&amp;gt;&lt;br /&gt;     &lt;span style="color:#0000ff"&gt;Function&lt;/span&gt; RetryRejectedCall(&lt;br /&gt;              &lt;span style="color:#0000ff"&gt;ByVal&lt;/span&gt; hTaskCallee &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; &lt;span style="color:#2b91af"&gt;IntPtr&lt;/span&gt;,&lt;br /&gt;             &lt;span style="color:#0000ff"&gt;ByVal&lt;/span&gt; dwTickCount &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Integer&lt;/span&gt;,&lt;br /&gt;             &lt;span style="color:#0000ff"&gt;ByVal&lt;/span&gt; dwRejectType &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Integer&lt;/span&gt;) &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Integer&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;     &amp;lt;&lt;span style="color:#2b91af"&gt;PreserveSig&lt;/span&gt;()&amp;gt;&lt;br /&gt;     &lt;span style="color:#0000ff"&gt;Function&lt;/span&gt; MessagePending(&lt;br /&gt;             &lt;span style="color:#0000ff"&gt;ByVal&lt;/span&gt; hTaskCallee &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; &lt;span style="color:#2b91af"&gt;IntPtr&lt;/span&gt;,&lt;br /&gt;             &lt;span style="color:#0000ff"&gt;ByVal&lt;/span&gt; dwTickCount &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Integer&lt;/span&gt;,&lt;br /&gt;             &lt;span style="color:#0000ff"&gt;ByVal&lt;/span&gt; dwPendingType &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Integer&lt;/span&gt;) &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Integer&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;span style="color:#0000ff"&gt;End&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Interface&lt;/span&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/p&gt;  &lt;p&gt;To use it, just drop that in your code and then wrap your automation code like this:&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:d944cd33-8295-4996-93f1-672b71826090" class="wlWriterEditableSmartContent"&gt; &lt;div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"&gt; &lt;div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"&gt;&lt;span style="color:#0000ff"&gt;Private&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Sub&lt;/span&gt; Automate()&lt;br /&gt; &lt;br /&gt;     &lt;span style="color:#2b91af"&gt;MessageFilter&lt;/span&gt;.Register()&lt;br /&gt; &lt;br /&gt;     &lt;span style="color:#0000ff"&gt;Try&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;         &lt;span style="color:#0000ff"&gt;Dim&lt;/span&gt; myOutApp &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; Outlook.&lt;span style="color:#2b91af"&gt;Application&lt;/span&gt; = &lt;span style="color:#0000ff"&gt;New&lt;/span&gt; Outlook.&lt;span style="color:#2b91af"&gt;Application&lt;/span&gt;()&lt;br /&gt;         &lt;span style="color:#0000ff"&gt;Dim&lt;/span&gt; myOutNS &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; Outlook.&lt;span style="color:#2b91af"&gt;NameSpace&lt;/span&gt; = myOutApp.Session&lt;br /&gt;         &lt;span style="color:#0000ff"&gt;Dim&lt;/span&gt; myOutlookFolder &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; Outlook.&lt;span style="color:#2b91af"&gt;MAPIFolder&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;         myOutlookFolder = myOutNS.GetDefaultFolder(Outlook.&lt;span style="color:#2b91af"&gt;OlDefaultFolders&lt;/span&gt;.olFolderInbox)&lt;br /&gt; &lt;br /&gt;         &lt;span style="color:#2b91af"&gt;MessageBox&lt;/span&gt;.Show(&lt;span style="color:#0000ff"&gt;String&lt;/span&gt;.Format(&lt;span style="color:#a31515"&gt;&amp;quot;{0} unread items in Inbox.&amp;quot;&lt;/span&gt;, myOutlookFolder.UnReadItemCount))&lt;br /&gt; &lt;br /&gt;         System.Runtime.InteropServices.&lt;span style="color:#2b91af"&gt;Marshal&lt;/span&gt;.ReleaseComObject(myOutlookFolder)&lt;br /&gt;         System.Runtime.InteropServices.&lt;span style="color:#2b91af"&gt;Marshal&lt;/span&gt;.ReleaseComObject(myOutNS)&lt;br /&gt;         System.Runtime.InteropServices.&lt;span style="color:#2b91af"&gt;Marshal&lt;/span&gt;.ReleaseComObject(myOutApp)&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;     &lt;span style="color:#0000ff"&gt;Catch&lt;/span&gt; ex &lt;span style="color:#0000ff"&gt;As&lt;/span&gt; &lt;span style="color:#2b91af"&gt;Exception&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;         &lt;span style="color:#008000"&gt;&amp;#39;Handle Exception&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;     &lt;span style="color:#0000ff"&gt;Finally&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;         &lt;span style="color:#2b91af"&gt;MessageFilter&lt;/span&gt;.Revoke()&lt;br /&gt; &lt;br /&gt;     &lt;span style="color:#0000ff"&gt;End&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Try&lt;/span&gt;&lt;br /&gt; &lt;span style="color:#0000ff"&gt;End&lt;/span&gt; &lt;span style="color:#0000ff"&gt;Sub&lt;/span&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;The important part to notice is the calls to MessageFilter.Register and MessageFilter.Revoke.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10022603" width="1" height="1"&gt;</content><author><name>pcreehan1</name><uri>http://blogs.msdn.com/pcreehan/ProfileUrlRedirect.ashx</uri></author><category term="Outlook" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/Outlook/" /><category term="Outlook Object Model" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/Outlook+Object+Model/" /><category term="Outlook 2007" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/Outlook+2007/" /><category term=".NET" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/-NET/" /><category term="RPC" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/RPC/" /><category term="DevMsgTeam" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/DevMsgTeam/" /></entry><entry><title>Introducing The Outlook Social Connector Provider Proxy Library</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/pcreehan/archive/2010/04/12/introducing-the-outlook-social-connector-provider-proxy-library.aspx" /><id>http://blogs.msdn.com/b/pcreehan/archive/2010/04/12/introducing-the-outlook-social-connector-provider-proxy-library.aspx</id><published>2010-04-12T20:50:18Z</published><updated>2010-04-12T20:50:18Z</updated><content type="html">&lt;p&gt;You may have heard of &lt;a href="http://www.officelabs.com/officetalk" target="_blank"&gt;OfficeTalk&lt;/a&gt;. You may have heard of the &lt;a href="http://blogs.msdn.com/outlook/archive/2009/11/18/announcing-the-outlook-social-connector.aspx" target="_blank"&gt;Outlook Social Connector&lt;/a&gt;. As it turns out, my team is responsible for supporting developers building Outlook Social Connector (OSC) providers for their social networks. As a means of learning about how the technology works in preparing myself and my team for supporting this new technology, I decided to take on the challenge of building an OSC provider for OfficeTalk. It turned out pretty well and I learned a lot about the OSC and what sort of things our customers will be experiencing as they build their own connectors. That’s not really the point of this post though. In building OfficeTalkOSC I decided that it would be a great thing to have a library which sort of served as a buffer between the providers and the OSC itself and wrapped a lot of the logic that is confusing and problematic to implement. So I came up with the OSC Provider Proxy Library. The library should allow .NET developers to focus on the implementation of their business logic instead of the complexities of building an OSC provider from scratch.&lt;/p&gt;  &lt;p&gt;This library is implemented in &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=9cfb2d51-5ff4-4491-b0e5-b386f32c0992&amp;amp;displaylang=en" target="_blank"&gt;.NET Framework v4.0&lt;/a&gt; (RTM’d today). It boils the 4 interfaces the OSC requires down to just one. It abstracts the work of maintaining the XML schema rules and provides a nice object model around activities and templates. &lt;/p&gt;  &lt;p&gt;I would strongly suggest reading the documentation on building an OSC provider from &lt;a href="http://msdn.microsoft.com/en-us/library/ee829696(office.14).aspx" target="_blank"&gt;here&lt;/a&gt; first. This will provide a very strong foundation for what it takes to build an OSC provider and will make the OSCProvider library much more intuitive. &lt;/p&gt;  &lt;p&gt;Once you’ve read that documentation and you’re ready to begin, you can download the library and documentation from here: &lt;a title="http://code.msdn.microsoft.com/oscprovider" href="http://code.msdn.microsoft.com/oscprovider"&gt;http://code.msdn.microsoft.com/oscprovider&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Please also provide feedback using the &lt;a href="http://code.msdn.microsoft.com/oscprovider/WorkItem/List.aspx" target="_blank"&gt;Issue Tracker&lt;/a&gt; (for bugs and feature requests) and the &lt;a title="http://code.msdn.microsoft.com/oscprovider/Thread/List.aspx" href="http://code.msdn.microsoft.com/oscprovider/Thread/List.aspx"&gt;Discussions&lt;/a&gt; tab for general praise and adoration.&lt;/p&gt;  &lt;p&gt;This isn’t like an officially supported binary or anything like that (though you are welcome to use it) so their may be breaking changes between releases, but I’ll try to keep them to a minimum and document when those types of changes occur….I said “try”. :)&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9994678" width="1" height="1"&gt;</content><author><name>pcreehan1</name><uri>http://blogs.msdn.com/pcreehan/ProfileUrlRedirect.ashx</uri></author><category term="Outlook" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/Outlook/" /><category term="Outlook 2007" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/Outlook+2007/" /><category term=".NET" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/-NET/" /><category term="DevMsgTeam" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/DevMsgTeam/" /><category term="Outlook 2010" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/Outlook+2010/" /><category term="Outlook Social Connector" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/Outlook+Social+Connector/" /><category term="OSC" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/OSC/" /></entry><entry><title>How To Programmatically Access Exchange 2010 Archive Mailboxes</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/pcreehan/archive/2010/03/04/how-to-programmatically-access-exchange-2010-archive-mailboxes.aspx" /><id>http://blogs.msdn.com/b/pcreehan/archive/2010/03/04/how-to-programmatically-access-exchange-2010-archive-mailboxes.aspx</id><published>2010-03-04T19:07:11Z</published><updated>2010-03-04T19:07:11Z</updated><content type="html">&lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/dd979795.aspx" target="_blank"&gt;Archive mailboxes&lt;/a&gt; are a new concept in Exchange 2010 that solve some of the problems inherent in PST archives – the primary of which being that there’s no way to access your PST files from a different machine. Archive mailboxes solve this by providing you a second mailbox you can use to archive mail from your primary mailbox in a location that is accessible via OWA and from other computers.&lt;/p&gt;  &lt;p&gt;In a future release, there should be functionality to access these archive mailboxes with web services, but as of the time of this writing, there’s no way to access the archive mailboxes with EWS.&lt;/p&gt;  &lt;p&gt;You can, however access these new mailboxes with MAPI. You simply pass the legacy DN of the mailbox into IExchangeManageStore::CreateStoreEntryId to create an ENTRYID you can use in your call to &lt;a href="http://msdn.microsoft.com/en-us/library/cc842103.aspx" target="_blank"&gt;OpenMsgStore&lt;/a&gt;. The LegacyDN you need can be retrieved from a call to the new SOAP AutoDiscover service. Simply call &lt;a href="http://msdn.microsoft.com/en-us/library/dd877096.aspx" target="_blank"&gt;GetUserSettings&lt;/a&gt; and include the &lt;a href="http://msdn.microsoft.com/en-us/library/ee693088.aspx" target="_blank"&gt;AlternateMailboxes&lt;/a&gt; setting in your RequestedSettings value. If you get a result in this property, and it looks just like your UserDN but with an added /guid=&amp;lt;some guid&amp;gt; at the end, then that’s your archive mailbox.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9973040" width="1" height="1"&gt;</content><author><name>pcreehan1</name><uri>http://blogs.msdn.com/pcreehan/ProfileUrlRedirect.ashx</uri></author><category term="MAPI" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/MAPI/" /><category term="EWS" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/EWS/" /><category term="DevMsgTeam" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/DevMsgTeam/" /><category term="Exchange 2010" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/Exchange+2010/" /><category term="AutoDiscover" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/AutoDiscover/" /></entry><entry><title>That’s My Name, Don’t Wear It Out</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/pcreehan/archive/2010/02/01/that-s-my-name-don-t-wear-it-out.aspx" /><id>http://blogs.msdn.com/b/pcreehan/archive/2010/02/01/that-s-my-name-don-t-wear-it-out.aspx</id><published>2010-02-01T21:25:24Z</published><updated>2010-02-01T21:25:24Z</updated><content type="html">&lt;h5&gt;Part 1&lt;/h5&gt;  &lt;p&gt;It used to be in earlier versions of Exchange, you were able to change the names of the “special” folders, like Inbox, Calendar, Tasks, etc. This is because MAPI keeps track of the Entry ID for these special folders in properties stored on the root folder. As long as the folder never got deleted, the Entry ID for that folder would work, and if it ever did, we simply updated the Entry ID we had stored.&lt;/p&gt;  &lt;p&gt;It was always risky to do that though, because if you were using a path or URL that was defined by the display name of the folder, you could break yourself. So we locked down certain APIs, such as OOM (&lt;a href="http://support.microsoft.com/kb/831363"&gt;http://support.microsoft.com/kb/831363&lt;/a&gt;) to not allow you to update the display name on some &lt;a href="http://msdn.microsoft.com/en-us/library/cc463910(EXCHG.80).aspx"&gt;special folders&lt;/a&gt;. EWS and OWA had the same limitation in Exchange 2007 (and continue to in Exchange 2010). As you are probably aware, EWS and OWA use an internal API dubbed “XSO” for communicating with the information store. What’s new in Exchange 2010 is that we moved MAPI to the middle tier, into a process we call &lt;a href="http://technet.microsoft.com/en-us/library/ee332317.aspx"&gt;RPC Client Access&lt;/a&gt;. So now, Outlook, CDO 1.21, and all other MAPI applications talk to the CAS server instead of talking to the mailbox role directly.All the MAPI logic gets funneled through XSO as it goes to the store. Because we’re going through XSO now, we are subject to the same constraints that EWS and OWA endure. This means that MAPI can now no longer update the &lt;a href="http://msdn.microsoft.com/en-us/library/cc842383.aspx"&gt;PidTagDisplayName&lt;/a&gt; property on special folder types.&lt;/p&gt;  &lt;p&gt;For a list of folder types that cannot be renamed, run this PowerShell command in EMS: &lt;strong&gt;[System.Enum]::GetNames([Microsoft.Exchange.Data.Storage.DefaultFolderType])&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This is obviously just an enumeration that includes members such as “None”, so use your common sense to decipher this list, but you should get the idea of which folders these enumeration values are referring to.&lt;/p&gt;  &lt;p&gt;We saw this new truth surface recently with a customer who was attempting a &lt;a href="http://msdn.microsoft.com/en-us/library/cc839922.aspx"&gt;CopyTo&lt;/a&gt; operation on a message store object in MAPI. As MAPI went through each folder attempting to &lt;a href="http://msdn.microsoft.com/en-us/library/cc765899.aspx"&gt;SetProps&lt;/a&gt; on the destination, the call failed with MAPI_E_CORRUPT_DATA which bubbled up to the caller. Digging in, we saw that the problem was in setting the PidTagDisplayName on the Common Views folder. We were able to verify that in Exchange 2007, EWS is unable to change the DisplayName on the special folders but MAPI is able to, however in Exchange 2010, this same operation doesn’t work from MAPI.&lt;/p&gt;  &lt;p&gt;So if your MAPI application is doing any copy operations or calling SetProps on a folder object, you may want to exclude PidTagDisplayName property on these special folders.&lt;/p&gt;  &lt;h5&gt;Part B&lt;/h5&gt;  &lt;p&gt;This also serves as a good recommendation in general for testing your MAPI applications against Exchange 2010. If something gives you an error that didn’t used to on previous versions (especially Exchange 2007) then chances are, the problem is related to RPC Client Access (RCA) and MAPI going through XSO. To see if your problem is related to MAPI or is in XSO, try doing the same operation (or as close as you can) in EWS. You can use &lt;a href="http://blogs.msdn.com/mstehle/archive/2009/11/09/announcing-ewseditor-1-5.aspx"&gt;EWSEditor&lt;/a&gt; to run through your repro. If you get a similar error, it’s most likely the case that what you are seeing is a result of MAPI going through the XSO layer. If EWS and/or OWA don’t have the same problem as your application does, your problem becomes a little more interesting.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9956584" width="1" height="1"&gt;</content><author><name>pcreehan1</name><uri>http://blogs.msdn.com/pcreehan/ProfileUrlRedirect.ashx</uri></author><category term="Outlook" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/Outlook/" /><category term="Exchange" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/Exchange/" /><category term="MAPI" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/MAPI/" /><category term="Outlook Object Model" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/Outlook+Object+Model/" /><category term="Outlook 2007" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/Outlook+2007/" /><category term="Exchange 2007" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/Exchange+2007/" /><category term="CDO 1.21" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/CDO+1-21/" /><category term="EWS" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/EWS/" /><category term="DevMsgTeam" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/DevMsgTeam/" /><category term="Exchange 2010" scheme="http://blogs.msdn.com/b/pcreehan/archive/tags/Exchange+2010/" /></entry></feed>