MAPI Windows 7 64 bit

epotter picture epotter · Mar 4, 2010 · Viewed 17.6k times · Source

I've got a legacy application that creates an email message with an attachment. The code uses the MAPI interface to create the message. This code has worked for quite some time.

When the application is run on a Windows 7 64 bit machine, the call to MAPILogon fails with a generic error code.

Is there an incompatibility with MAPI and Win7 64? Or is there some COM issue that I am not aware of?

Answer

epotter picture epotter · Mar 10, 2010

It looks like the problem depends on which API calls you are using.

Calls to MAPISendMail should work without a problem.

For all other MAPI method and function calls to work in a MAPI application, the bitness (32 or 64) of the MAPI application must be the same as the bitness of the MAPI subsystem on the computer that the application is targeted to run on.

In general, a 32-bit MAPI application must not run on a 64-bit platform (64-bit Outlook on 64-bit Windows) without first being rebuilt as a 64-bit application.

For a more detailed explination, see the MSDN page on Building MAPI Applications on 32-Bit and 64-Bit Platforms