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

  • Blog Home
  • About
  • Email Blog Author
  • Share this
  • RSS for posts
  • Atom
  • RSS for comments
  • 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)

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
  • Stephen Griffin - MSFT
    19 Jun 2007 9:25 AM

    kevin - did you try the steps I gave for MFCMAPI? They describe exactly what you need to do.

  • shivaraj
    25 Jul 2007 1:53 AM

    In my exchange 2007 setup even after downloading "ExchangeMapiCdo.EXE" MAPI code is failing during GetMessageStore with error code "HRESULT: 8004011d" .  Any idea whats wrong?

    Regards,

    Shivaraj

  • Stephen Griffin - MSFT
    25 Jul 2007 9:33 AM

    I can only guess you didn't set CONNECT_IGNORE_NO_PF correctly on the profile.

  • Taking the mess out of Messaging Development
    7 Aug 2007 11:41 AM

    If you've been bit by the problems with the web download of CDO 1.21 returning a 8004011D when trying

  • John Young
    6 Sep 2007 4:19 PM

    Stephen, is there a true 64 bit version of MAPI32.dll for use with x64 applications?  We are running a 64 bit app and MAPIInitialize returns E_FAIL.  The MAPI/CDO download for Exchange 2007 does not fix this either

  • Stephen Griffin - MSFT
    6 Sep 2007 4:55 PM

    MAPI is 32 bit only. We don't make a 64 bit MAPI right now.

  • mvd
    1 Oct 2007 1:58 PM

    Hello Stephen, do we have any opportunity to install .PST provider without Outlook. If yes, how we can do this? And another one what is the latest version of pst provider is available for NT4?

  • Stephen Griffin - MSFT
    1 Oct 2007 2:03 PM

    Exchange's MAPI includes an ANSI only PST provider. As for NT4 - um - maybe you could install the Exchange 5.5 system manager?

  • Nayan's [MSFT] Blog
    13 Dec 2007 3:14 PM

    Is there a way to access Personal Store (PST) wihtout having Outlook installed? Reason: Take out the

  • Vladimir Werskov
    12 Mar 2008 7:23 AM

    One quick question regarding the MAPI download. Is it true, that this version of mapi32.dll does not return the STORE_UNICODE_OK flag in the PR_STORE_SUPPORT_MASK property? Even if the store supports UNICODE, the flag is never set. Forcing MAPI_UNICODE works as expected, but how can i find out if a store is really UNICODE capable?

  • Stephen Griffin - MSFT
    12 Mar 2008 9:53 AM

    I looked in the code and it doesn't appear Exchange's implementation of MAPI is aware of the STORE_UNICODE_OK flag. As far as MAPI_UNICODE is concerned, calls that don't support it will always let you know...

  • SGriffin's [MSFT] WebLog
    14 Jul 2008 11:09 AM

    One of my customers reported that using the MAPI download , they were unable to get a referral from Exchange

  • vikram
    28 Aug 2008 4:32 AM

    Hi,

    I have modified the user profile as you said (using MFCMAPI) but when i try to get the store mailbox table on exchange server 2007 i get the error for HrQueryAllRows function :

    "MAPI_E_NOT_INITIALIZED == 0x80040605".

    The user has admin privileges and I even tried with the administrator also.

    I am getting this error after logging in and got the IEXCHANGEMANAGER and the when i use HrQueryAllRows function. I thought something must be wrong with my code so i used MFCMAPI. it also gives the same error:

    "MAPI_E_NOT_INITIALIZED == 0x80040605

    Function m_lpContentsTable->QueryColumns( 0, &lpOriginalColSet)"

    What might be the problem?

  • Stephen Griffin - MSFT
    28 Aug 2008 7:14 AM

    I've seen people follow the steps incorrectly and set the prop on the wrong profile section. Try again, and make sure to follow each step carefully. Do not use "Open Profile Section" as a shortcut.

    Also - after you set the flag, make sure the hex value is 0x8002.

  • vikram
    28 Aug 2008 7:45 AM

    Yes I have double checked the steps for modifying and also verified the PR_PROVIDER_UID of 13DBB0C8AA05101A9BB000AA002FC45A. I opened the correct profile, and there was only one service : MSEMS. After modifying the flag i verified that the value is 0x8002. but still i get the same error.

    Is it the problem with server configuration or am i missing some dll files?

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