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

  • Blog Home
  • About
  • Email Blog Author
  • Share this
  • RSS for posts
  • Atom
  • RSS for comments
  • CDO (24)
  • Code Snippet (43)
  • Custom Providers (17)
  • Debugging (7)
  • DevMsgTeam (300)
  • Documentation (108)
  • DST (8)
  • EWS (7)
  • Exchange (108)
  • Gotchas (97)
  • Hotfix (28)
  • MAPI (239)
  • MAPI Download (53)
  • MFCMAPI (101)
  • 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 (2)
  • 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)

MAPI and Exchange 2007

MSDN Blogs > SGriffin's MAPI Internals > MAPI and Exchange 2007

MAPI and Exchange 2007

Rate This
Stephen Griffin - MSFT
19 Mar 2007 3:08 PM
  • Comments 43

Most of you have realized by now that Exchange 2007 doesn't include MAPI "in the box". We're supporting two ways to put MAPI on an Exchange 2007 server:

  • The MAPI Download
  • Outlook 2007

Some of you have noticed as well that with Exchange 2007, you don't have to have a Public Folder store. What happens when you try to connect to an Exchange 2007 server that doesn't have a Public Folder store?

With Outlook 2007, you connect with no problem. Earlier versions of Outlook get this error:

"Your Exchange Server administrator has blocked the version of Outlook that you are using. Contact your administrator for assistance."

MAPI applications will get the error MAPI_E_FAILONEPROVIDER if they're using any version of MAPI except the version supplied by Outlook 2007.

So what's a developer to do? Are you locked in to Outlook 2007's MAPI? Why did we provide a MAPI download if it won't even work?

Introducing CONNECT_IGNORE_NO_PF

Exchange 2007 blocks all MAPI providers earlier than Outlook 2007 when Public Folders are not available. This is because all of the earlier clients assume Public Folders will be available and will experience failures if allowed to connect. For customers whose code does not depend on Public Folders, a new flag has been made available to allow this check to be bypassed.

Right now, the only version of MAPI which supports this new flag is the MAPI download.

Details on the new flag:

#define CONNECT_IGNORE_NO_PF ((ULONG)0x8000)

This is set in the PR_PROFILE_CONNECT_FLAGS property on the global profile section.

The global profile section can be accessed by calling OpenProfileSection with pbGlobalProfileSectionGuid, which is defined in edkmdb.h.

When this flag is set, Exchange 2007 will not check if public folders are available when logging on. Use of this flag can be demonstrated with MAPI Editor:

  1. Install the new MAPI download
  2. In MAPI Editor, do Profile/Show Profiles and open the profile you wish to work on
  3. Locate the MSEMS service and open it
  4. Locate the profile section with the PR_PROVIDER_UID of 13DBB0C8AA05101A9BB000AA002FC45A and single click on it
  5. In the lower pane, locate PR_PROFILE_CONNECT_FLAGS
  6. Edit this property to OR in the new flag. So for instance, if it previously had 0x2 in there, it would now have 0x8002
  7. Close all the profile windows and attempt to log on

Caveats

  • Even with this flag you won't be able to use Public Folders (they don't exist) so any errors attempting to open or reference them would be expected.
  • Both the client side MAPI binaries and the Exchange store need to be aware of the flag for it to work.
  • Builds of MAPI that understand this flag are the one from the download only and Exchange 2003 06.05.09.7652 or higher (KB 929751)
  • Builds of the Exchange store that understand this flag are Exchange 2007 and Exchange 2003 06.05.09.7652 or higher (KB 929751)
  • The build of CDO included in the download will automatically set this flag on dynamic profiles.
  • Previous versions of Exchange may not understand this flag, so be sure only to set it when logging on to an Exchange 2007 mailbox.

Update - 4/17/07 Removed inadvertent assertion that there is a build of Exchange 2003 MAPI that understands this flag. If such a build does become available I'll update again.

  • 43 Comments
Exchange, MAPI, Documentation, Public Folders, MAPI Download, DevMsgTeam
Comments
  • Eriq VanBibber
    20 Mar 2007 3:20 PM

    Steve,

    Can you disclose how exchange is verifying the outlook version?

    Could we as developers change the version in the profile to be 2007 and remove the public folder provider from the profile?

    For that matter, why can't we just remove the PF provider and have downlevel clients work?

    I agree that the default for older clients is to have a PF provider in the profile, but it seems unfair that no check is made to determine if a PF provider even exists before failing on the profile.

    Regards,

    Eriq

  • Eriq VanBibber
    20 Mar 2007 3:24 PM

    Outlook on an Exchange Server?

    Steve, maybe i am misinterpreting your comments.

    In previous releases it was strongly cautioned against deploying Outlook on an exchange server because of the mapi stub.

    Is this no longer the case?  Can outlook 2007 be installed on a 2007 exchange server without issue?

    -Eriq

  • Stephen Griffin - MSFT
    20 Mar 2007 3:45 PM

    That we support putting Outlook 2007 on an Exchange 2007 server should be in the release notes. Dave blogged about it here:

    http://blogs.msdn.com/dgoldman/archive/2007/02/27/installing-outlook-2007-on-an-exchange-2007-server.aspx

    The version number that Exchange gets is actually the version of the emsmdb32.dll binary, so you won't be able to "set" it.

  • Dmitry Streblechenko
    21 Mar 2007 12:46 PM

    Steve,

    which methods will return MAPI_E_FAILONEPROVIDER in case of the version mismatch? Is it on the first call that causes an RPC?

  • Stephen Griffin - MSFT
    21 Mar 2007 2:07 PM

    Dmitry - Good question - it's on OpenMsgStore. If you play around with this, you'll probably see that AB access still works.

  • Eriq VanBibber
    21 Mar 2007 3:15 PM

    Steve,

    Does 'the MAPI Download' still use the 'stubbed' approach as previous versions?

  • Stephen Griffin - MSFT
    21 Mar 2007 3:49 PM

    The MAPI download installs Exchange's MAPI32.dll directly into system32 - it does not use the stub.

  • Dmitry Streblechenko
    24 Mar 2007 2:30 PM

    Steve,

    speaking of versions, versions of Outlook prior to 2007 used to set the PR_PROFILE_SERVER_VERSION in the global profile section.

    I don't think Outlook 2007 does that anymore in neither cached nor online mode.

    Is the Exchange server version still stored somewhere?

  • SGriffin's [MSFT] WebLog
    29 Mar 2007 5:18 PM

    Following up on my previous article on CONNECT_IGNORE_NO_PF , I had a customer recently who claimed MAPI

  • Stephen Griffin - MSFT
    30 Mar 2007 10:17 AM

    Dmitry - there IS a new prop (in the same place as the old one), but it's not documented (yet). I'm sure you'll be able to find it. :)

  • NjDude
    2 May 2007 12:33 PM

    We have an EDK based MAPI connector with Exchange 2000/2003. How do you use it on Exchange 2007 ? Can i use it or no ?

    Any help is appreciated...

  • Stephen Griffin - MSFT
    4 May 2007 10:28 AM

    You can't - but you don't need to either. Exchange 2007 has a much simpler mechanism for building connectors. See the documentation on Foreign Connectors: http://technet.microsoft.com/en-us/library/aa996779.aspx

  • TomazB
    11 May 2007 9:47 AM

    Hi,

    The download MAPI works fine for the 'old-format' PST but does not work for Outlook 2003/2007 format. IMsgServiceAdmin->ConfigureMsgService() returns MAPI_E_EXTENDED_ERROR. I read in some other blog that Exchange 2007 SP1 will provide functionality to export/import also the new PST. Is this anyhow related with the standalona MAPI and will this be enhanced to support new SPT format too?

  • Stephen Griffin - MSFT
    11 May 2007 2:08 PM

    The download is Exchange's MAPI, which only includes an ANSI PST provider. What you're looking for is the Unicode PST provider - don't hold your breath waiting for it to show up in the download.

  • kevin
    19 Jun 2007 2:53 AM

    What else has to happen to the profile? I am creating a brand new profile and now when OpenMsgStore() is called, I receive a unconfigured profile error (8004011C) instead of the 011D.

    Even if I stop my program and manually update the profile in the middle I will get this error.

    It seems like the profile isn't getting fully saved before the update happens. I'm just not sure what is wrong, the code works with Ex2007 with public folders, Ex2003, Ex2000, even 5.5.

    Do you have any sample code to show the process of updating the PR_PROFILE_CONNECT_FLAGS?

Page 1 of 3 (43 items) 123
Leave a Comment
  • Please add 4 and 5 and type the answer here:
  • Post
  • © 2013 Microsoft Corporation.
  • Terms of Use
  • Trademarks
  • Privacy & Cookies
  • Report Abuse
  • 5.6.426.415