2010-03-04 128 views
4

我有一个遗留应用程序,它创建一个带有附件的电子邮件消息。该代码使用MAPI界面创建消息。这段代码已经运行了很长时间了。MAPI Windows 7 64位

当应用程序在Windows 7 64位计算机上运行时,对MAPILogon的调用将失败并显示一般错误代码。

是否与MAPI和Win7 64不兼容?还是有一些我不知道的COM问题?

+1

我没有在Win7的X64尚未测试过,我会尝试,当我下班回家。但是,如果它对你有帮助,我在win7 32上完全没有任何MAPI问题。 – 2010-03-04 20:55:19

+1

我对Win7 x64上的MAPI没有任何问题。请注意,在设置Windows Mail或Windows Live Mail或任何其他邮件客户端之前,没有默认邮件客户端和默认MAPI提供程序。 – wqw 2010-03-04 22:20:31

+0

@Quintin,你有没有机会在Win 7 x64上测试MAPI? – epotter 2010-03-08 15:10:44

回答

7

它看起来像这个问题取决于哪个API调用你使用完成。

调用MAPISendMail应该没有问题。

对于在MAPI应用程序中工作的所有其他MAPI方法和函数调用,MAPI应用程序的位数(32或64)必须与应用程序针对的计算机上的MAPI子系统的位数相同运行。

通常,如果不首先将其重建为64位应用程序,则32位MAPI应用程序不得在64位平台(64位Windows上的64位Outlook)上运行。

有关更详细的explination,看到Building MAPI Applications on 32-Bit and 64-Bit Platforms

-2

没有特别的问候MAPI肯定,但也可以是如果它在.NET

+0

你能否详细说明“可以,如果它在.Net中完成”? – epotter 2010-03-08 15:09:45

+0

如果没有编译为32位,我就遇到了.net的问题,它会自动使用64位,并且在使用32位COM组件 – 2010-03-08 21:56:30

1

我经历过这样的事情与使用Crystal Reports 8.5遗留应用程序的MSDN页面。 CR报告查看器有一个“导出”按钮,它会显示一个对话框,让您选择“目的地”,其中之一是“Microsoft Mail(MAPI)”。导出到MAPI是在Windows 7

失败显然给Microsoft问题是由于在Windows放弃对“简单MAPI”支持7

我们能够与微软此修复程序来解决问题: http://support.microsoft.com/kb/980681

这里有可能对任何人有所帮助有类似的问题,其他一些讨论:

1

试试这个

@echo off 
REM NOTE: The MAPI32.dll must be included in the same directory as this patchfile!! 
REM NOTE: change the username to corresponding if you're not on a domain remove @domain 

takeown /f c:\windows\system32\mapi32.dll 
cacls c:\windows\system32\mapi32.dll /G [email protected]:F 
ren c:\windows\system32\mapi32.dll c:\windows\system32\mapi32.dll.ORIGINAL 
copy mapi32.dll c:\windows\system32\mapi32.dll 

if NOT '%PROCESSOR_ARCHITECTURE%'=='AMD64' goto END 
takeown /f c:\windows\sysWOW64\mapi32.dll 
cacls c:\windows\sysWOW64\mapi32.dll /G [email protected]:F 
ren c:\windows\sysWOW64\mapi32.dll c:\windows\sysWOW64\mapi32.dll.ORIGINAL 
copy mapi32.dll c:\windows\sysWOW64\mapi32.dll 
:END