Building MAPI applications on 32-bit and 64-bit platforms

Source: Internet
Author: User
Tags stub microsoft outlook

https://msdn.microsoft.com/en-us/library/dd941355 (office.14). aspx


Building MAPI applications on 32-bit and 64-bit platforms Office Other versions

Last Modified: April 12, 2011

applies To: Office 2010 | Outlook 2010 | Visual Studio

This is the topic describes the actions that are MAPI developers should take to change and rebuild 32-bit MAPI applications to run A 64-bit platform, and 64-bit applications to run on a 32-bit platform. In this topic, a 64-bit platform are a computer installed with 64-bit Microsoft Outlook and 64-bit Windows, and a 32-bit pl Atform is a computer installed with a 32-bit Outlook and 32-bit or 64-bit Windows. operating System and Office Support for 64-bit Outlook

Note

The term bitness refers to the distinction between 32-bit and 64-bit processor architectures and the associated ity of applications. In this topic, bitness are used to qualify the version of Windows, Microsoft Office, Outlook, or a MAPI application built T o suit a 32-bit or 64-bit processor architecture of a computer, and possibly other applications.

Starting in Microsoft Office, the Outlook is available as a 32-bit and a 64-bit application. On the same computer, the bitness of Outlook depends on the bitness of the Windows operating system (x86 or x64), and of M Icrosoft Office, if Office is already installed in that computer. The following are some of the factors that determine the feasibility of installing a 32-bit or a 64-bit version of Outlook :

32-bit Office (and 32-bit Outlook) can is installed on a 32-bit or 64-bit version of the Windows operating system. 64-bit Office (and 64-bit Outlook) can is installed only on a 64-bit operating system.

The default installation of Office on a 64-bit version of the Windows operating system is 32-bit Office.

The bitness of installed version of Outlook is always the same as the bitness of Office, if Office was installed on the Same computer. In the other words, a 32-bit version of Outlook cannot is installed on the same computer that already has 64-bit versions of O Ther Office applications installed, such as 64-bit Microsoft Word or 64-bit Microsoft Excel. Similarly, a 64-bit version of Outlook cannot is installed on the same computer this already has 32-bit versions Office applications installed. preparing MAPI applications for 32-bit and 64-bit platforms

MAPI applications include standalone applications such as Microsoft Communicator and MFCMapi, and service providers Su Ch as Address Book, store, and transport providers. For MAPI-and function calls to work in-a MAPI application (with the exception of one Simple MAPI Function, map Isendmail), the bitness of the MAPI application must is the same as the bitness of the MAPI subsystem on the computer that The application is targeted to run on. The bitness of the MAPI subsystem, in turn, are determined by and always the same as the bitness of the installed version O F Outlook. The following table summarizes the necessary actions to prepare MAPI applications to run on targeted computers configured With Office and Windows of various bitness.

Bitness of MAPI Application

Bitness of Outlook on targeted computer

Bitness of Windows on targeted computer

Necessary action to enable application to run on targeted computer

32-bit

32-bit

32-bit or 64-bit

No specific action is necessary.

32-bit

64-bit

64-bit

Rebuild the application as a 64-bit application. Otherwise, all MAPI method and function calls (except Formapisendmail) would fail.

64-bit

64-bit

64-bit

No specific action is necessary.

64-bit

32-bit

32-bit or 64-bit

Rebuild the application as a 32-bit application. Otherwise, all MAPI method and function calls (except Formapisendmail) would fail.

The following sections further explain each scenario. For scenarios that require rebuilding the MAPI application, and how To:link to MAPI functions for additional Regarding linking to and calling MAPI functions. 32-bit MAPI application and 32-bit Outlook

MAPI applications compiled for a 32-bit MAPI subsystem this is available in 32-bit versions of Outlook, including thos e versions prior to Microsoft Outlook continue to is supported on computers installed with 32-bit Outlook and a 32-b It or 64-bit Windows operating system. There is no specific action necessary for the application developers. 32-bit MAPI application and 64-bit Outlook

32-bit MAPI applications are not supported to run on a computer installed with 64-bit Outlook and 64-bit Windows. The application developer must update and rebuild the application as a 64-bit for the application 64-bit. This is because a 32-bit application cannot load a 64-bit Msmapi32.dll file. There are a small number of API changes that application developers must incorporate to builds their code successfully for A 64-bit environment. MAPI header files have been updated with this changes to support the 64-bit platform. You can download these header files At outlook 2010:mapi header files. Developers can use this same the set of MAPI header files to build both 32-bit and 64-bit MAPI applications. 64-bit MAPI application and 64-bit Outlook

64-bit MAPI applications are supported on computers installed with 64-bit Outlook and 64-bit Windows. There is no specific action necessary for the application developers. 64-bit MAPI application and 32-bit Outlook

64-bit MAPI applications are not supported to run on a computer installed with 32-bit Outlook and 32-bit or 64-bit Windows . The application developer must update and rebuild the application as a 32-bit application to work with 32-bit Outlook. Use the updated MAPI header files, which can download at Outlook 2010:mapi header files. Developers can use this same the set of MAPI header files to build both 32-bit and 64-bit MAPI applications. Exception:mapisendmail

In general, a 32-bit MAPI application must not run on a 64-bit platform (64-bit Outlook on 64-bit Windows) without Fir St being rebuilt as a 64-bit application, and a 64-bit MAPI application must not run on a computer installed with 32-bit O Utlook and 32-bit or 64-bit Windows without the being as a rebuilt 32-bit. Figure 1 shows a alert dialog box that would to displayed if either of these scenarios occurs. Figure 1. The ERROR message is for most cross-bitness MAPI calls.

However, one function call among all Simple MAPI and MAPI elements, MAPISendMail, would succeed in a Windows-32-bit-on-win Dows-64-bit (WOW64) or Windows-64-bit-on-windows-32-bit (WOW32) scenario and would not result in the above alert. This is WOW64 scenario only applies to Windows 7. Figure 2 shows a WOW64 scenario in which a 32-bit MAPI application calls to MAPISendMail on a computer installed with 64-bit Windows 7. In this scenario, the MAPI library makes a COM call to launch a 64-bit FIXMAPI application. The FIXMAPI application implicitly links to the MAPI library, which routes the function call to the Windows MAPI stub, WHI Ch in turn forwards the "call to" Outlook MAPI stub, enabling Themapisendmail function call to succeed. Figure 2. Processing MAPISendMail in a WOW64 scenario.
Also Concepts How To:link to MAPI functions

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.