• Sign in
 
  •  
  • MSDN Blogs
  • Microsoft Blog Images
  • More ...

  • About
  • Email Blog Author
  • RSS for posts
  • Atom
  • RSS for comments
    • OK
  • CDO (25)
  • Code Snippet (43)
  • Custom Providers (17)
  • Debugging (7)
  • DevMsgTeam (303)
  • Documentation (111)
  • DST (8)
  • EWS (7)
  • Exchange (110)
  • Gotchas (98)
  • Hotfix (28)
  • MAPI (241)
  • MAPI Download (55)
  • MFCMAPI (102)
  • MSDN (59)
  • Non Dev (11)
  • OOM (17)
  • Outlook (171)
  • Outlook 2007 Auxiliary Reference (45)
  • Outlook Integration API (12)
  • Protocol Docs (20)
  • PST/OST (23)
  • Referrals (8)
  • Vista (12)
  • WrapPST (18)
Links:
  • Download MFCMAPI
  • MFCMAPI on Facebook
  • Troubleshooting Outlook Crashes
  • Office Update Center
  • Developer Messaging Team Blog
This site is provided "AS IS" with no warranties, and confers no rights. Use of included code samples are subject to the terms specified in the Terms of Use.
Archives
  • May 2013 (5)
  • April 2013 (1)
  • March 2013 (2)
  • February 2013 (2)
  • January 2013 (2)
  • December 2012 (4)
  • November 2012 (2)
  • October 2012 (2)
  • September 2012 (1)
  • August 2012 (3)
  • June 2012 (2)
  • May 2012 (1)
  • April 2012 (3)
  • March 2012 (3)
  • February 2012 (3)
  • January 2012 (1)
  • December 2011 (3)
  • November 2011 (1)
  • October 2011 (3)
  • September 2011 (1)
  • August 2011 (1)
  • July 2011 (4)
  • June 2011 (3)
  • May 2011 (3)
  • April 2011 (3)
  • March 2011 (5)
  • February 2011 (1)
  • January 2011 (2)
  • December 2010 (1)
  • November 2010 (4)
  • October 2010 (1)
  • September 2010 (3)
  • August 2010 (5)
  • July 2010 (3)
  • June 2010 (3)
  • May 2010 (1)
  • April 2010 (3)
  • March 2010 (3)
  • February 2010 (3)
  • January 2010 (2)
  • December 2009 (3)
  • November 2009 (5)
  • October 2009 (4)
  • September 2009 (5)
  • August 2009 (5)
  • July 2009 (11)
  • June 2009 (6)
  • May 2009 (5)
  • April 2009 (3)
  • March 2009 (18)
  • February 2009 (10)
  • January 2009 (3)
  • December 2008 (2)
  • November 2008 (2)
  • October 2008 (5)
  • September 2008 (4)
  • August 2008 (10)
  • July 2008 (6)
  • June 2008 (8)
  • May 2008 (2)
  • April 2008 (4)
  • March 2008 (2)
  • February 2008 (2)
  • January 2008 (5)
  • December 2007 (3)
  • November 2007 (2)
  • October 2007 (3)
  • September 2007 (1)
  • August 2007 (4)
  • July 2007 (5)
  • June 2007 (3)
  • May 2007 (4)
  • April 2007 (1)
  • March 2007 (6)
  • February 2007 (3)
  • January 2007 (2)
  • December 2006 (4)
  • November 2006 (3)
  • October 2006 (1)
  • August 2006 (1)
  • June 2006 (5)
  • May 2006 (5)
  • December 2005 (1)
  • November 2005 (4)
  • October 2005 (2)
  • September 2005 (1)
  • April 2005 (3)
  • December 2004 (2)
  • September 2004 (2)
  • August 2004 (3)
  • July 2004 (3)
Blogs I Read
  • Exchange

  • Raymond Chen [MSFT]

  • Larry Osterman [MSFT]

  • Peter David

  • Aaron Margosis [MSFT]

  • Jason Johnston [MSFT]

  • Matt Stehle (MSFT)

  • Patrick Creehan [MSFT]

  • Ryan Gregg [MSFT]

    Outlook PM
  • WebDav 101

    Dan Bagley (MSFT)
  • Dave Vespa [MSFT]

  • Randy Topken

    Outlook EE

April, 2009

MSDN Blogs > SGriffin's MAPI Internals > April, 2009
  • Subscribe via RSS
Sort by: Most Recent | Most Views | Most Comments
Excerpt View | Full Post View
  • SGriffin's MAPI Internals

    Office 2007 SP2 is Live!

    Posted over 4 years ago
    by Stephen Griffin - MSFT
    • 15 Comments

    Get it here:

    http://www.microsoft.com/downloads/details.aspx?FamilyId=B444BF18-79EA-46C6-8A81-9DB49B4AB6E5

  • SGriffin's MAPI Internals

    MAPI Named Properties

    Posted over 4 years ago
    by Stephen Griffin - MSFT
    • 1 Comments

    Jason Nelson has an interesting article up on the EHLO blog discussing MAPI named properties in Exchange. Specifically, he covers the history and reasons behind x-headers, how they’ve been handled in the past, and how we’ll be handling them in an upcoming rollup for Exchange 2007, and later, in Exchange 14.

    Addressing a couple of the comments to his article:

    Q: Is there any reason why the properties couldn't be at a per-message (or equivalent) level? Perhaps not as efficient, but if you're going to redesign it, why not allow 32K props per message?

    A: Because this would break everything. Every client that ever connects to Exchange would be broken.

    Q: Or why not store all the unknown x-headers in a text field that is always attached to PropID 0xFFFF?

    A: They always have been – they’re in PR_TRANSPORT_MESSAGE_HEADERS, which any app is free to parse. No data is being lost here.

  • SGriffin's MAPI Internals

    MAPI and .Net

    Posted over 4 years ago
    by Stephen Griffin - MSFT
    • 17 Comments

    Working with a customer the other day, I went looking for my blog post discussing the fact that MAPI is not supported with .Net. Turns out, while I’ve mentioned it several times, I’ve never devoted a topic to it. So here goes.

    Here are the articles which outlines our official support policies for MAPI and .Net, from both the Exchange and Outlook perspectives:

    Support policy for Microsoft Exchange APIs with the .NET Framework applications

    Support policy for Outlook APIs that are used in the .NET Framework environment

    A bit of history of this policy: When .Net was first announced, we (in Developer Support) were very excited. We took every API we supported and started figuring out how to invoke them from managed code. I myself wrote a series of KBs (never published) showing how to do pretty much everything with Simple MAPI, and had begun work developing a shim for Extended MAPI. But then the bugs started coming in. We had early adopters using MAPI and CDO 1.21 from .Net who were seeing strange error codes, memory leaks, and crashes. We started investigating these, and eventually asked development for their opinion.

    We went to the Exchange team first, to ask about their implementation of MAPI and CDO, and whether we could provide support for using either in managed code. The senior developer who not only owns, but who wrote a large portion of MAPI led the investigation. His conclusion: MAPI was not designed or tested to run in a managed environment, and we cannot provide support for doing so. A short (incomplete) list of problems he uncovered in his investigation:

    • Threading: MAPI is quite sensitive to which thread it’s running on and the token of that thread. These are used to index “instance data” shared among all threads/processes using MAPI. MAPI also creates its own threads for handling, among other things, notifications. None of this works well with the CLR thread pool, finalizer, and other quirks of threading in the CLR.
    • x64: .Net code can be compiled as “Any CPU”, where the process will run as a 32 bit process on a 32 bit processor, and 64 bit process on a 64 bit processor. Since MAPI is 32 bit only, any .Net application which uses MAPI and is compiled as “Any CPU” will fail when run on a 64 bit machine. We actually saw this on an internal .Net based tool where the developer had ignored our warnings against using MAPI.
    • Object lifetimes: Creation and destruction of objects in MAPI must be done in a rigid and controlled manner. The sequence of object creation and destruction is critical. Is it quite difficult to exert this level of control, especially over object destruction, from managed code.
    • Memory Management: MAPI has it’s own memory management scheme that isn’t really compatible with the CLR.

    We took the same question to Outlook, and given the shared development history of the Outlook and Exchange implementations of MAPI, the Outlook development team also concluded they would be unable to support MAPI or CDO with .Net.

    Now – what does it mean to say it’s not supported? It doesn’t necessarily mean you can’t make it work, given that you’re willing to put in an inordinate amount of time, effort, and development skill into it (a level at which, in my opinion, it would be simpler to just use C++). But it does mean that Microsoft, and specifically, the Developer Support Messaging team cannot help a customer develop an application that mixes MAPI/CDO in the same process as .Net. And it means if you’re running into a problem with your .Net application which uses MAPI/CDO, the first step in our investigation will be to see if you can demonstrate the problem occurs when .Net is removed from the picture.

    None of this is new information. Matt even wrote a similar article a couple years ago in which he discusses some of the alternatives. But given the surprised response I get from developers whenever I explain our support policy, I figure it was worth repeating.

Page 1 of 1 (3 items)
  • © 2013 Microsoft Corporation.
  • Terms of Use
  • Trademarks
  • Privacy & Cookies
  • Report Abuse
  • 5.6.426.415