none
Outlook 2016 and MAPI RRS feed

Answers

All replies

  • Outlook is built on top of Extended MAPI. So, all Outlook versions support Messaging API.

    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    Monday, April 24, 2017 1:22 PM
  • But some of our customers (with presumably a "Click-To-Run" version of Outlook 2016) are reporting that the MAPI functions of our software don't work.

    And according to this page, at least the "Click-To-Run" versions of Outlook 2010 didn't support MAPI:

    https://support.microsoft.com/en-us/help/981242/some-applications-are-incompatible-with-a-click-to-run-installation-of-outlook-2010

    Unfortunately I was not able to find a similar page with information about Outlook 2016.

    Monday, April 24, 2017 1:35 PM
  • You need to make sure you are loading the MAPI system correctly. Does MFCMAPI (of the appropriate bitness) run in their environment? If yes, see how MFCMAPI loads the MAPI system.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Monday, April 24, 2017 4:57 PM
  • We are currently using "MAPIStubLibrary" (https://github.com/stephenegriffin/MAPIStubLibrary).

    Is this deprecated?

    Tuesday, April 25, 2017 7:26 AM
  • That is what you need to be using. Are you running into a particular problem?

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Tuesday, April 25, 2017 3:18 PM
  • Yes, but its complicated. I try to explain what I found out after further investigating.

    Our code calls this function sequence every time it sends a mail:

    GetPrivateMAPI
    MAPIInitialize
    ... lots of MAPI functions ...
    MAPIUninitialize
    UnLoadPrivateMAPI

    The very first mail is sent without problems. For the second mail the program stops after "MAPIInitialize" with a message box that Outlook has to be repaired.

    What happenes is that for the first mail "GetPrivateMAPI" returns "msmapi.dll". During the sequence "olmapi32.dll" is also loaded into the process space.
    "UnLoadPrivateMAPI" then unloads "msmapi.dll", but "olmapi32.dll" does not get unloaded automatically.

    So for the second mail "GetPrivateMAPI" returns "olmapi32.dll" and this seems to cause the problem.

    The problem did not occur with older Outlook versions. I tested it for example with Outlook 2007. There "GetPrivateMAPI" returns "olmapi32.dll" already with the first mail.

    As a workaround I now have moved the call to "UnLoadPrivateMAPI" to the ending of our program.

    Wednesday, April 26, 2017 7:39 AM
  • It is not a good idea to unload the MAPI system and then load it again. You'd be better off to always have it loaded until your app terminates.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Wednesday, April 26, 2017 10:26 PM