MAPI Windows 7 64 位
我有一个遗留应用程序,可以创建带有附件的电子邮件。该代码使用 MAPI 接口来创建消息。这段代码已经工作了一段时间了。
当应用程序在 Windows 7 64 位计算机上运行时,对 MAPILogon 的调用失败并显示通用错误代码。
是否与MAPI和Win7 64不兼容?或者是否有一些我不知道的 COM 问题?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
看起来问题取决于您使用的 API 调用。
对 MAPISendMail 的调用应该没有问题。
对于在 MAPI 应用程序中工作的所有其他 MAPI 方法和函数调用,MAPI 应用程序的位数(32 或 64)必须与要运行该应用程序的计算机上的 MAPI 子系统的位数相同。
通常,如果未首先将 32 位 MAPI 应用程序重新构建为 64 位应用程序,则 32 位 MAPI 应用程序不得在 64 位平台(64 位 Windows 上的 64 位 Outlook)上运行。
有关更详细的说明,请参阅 MSDN 页面上的 构建 MAPI 32 位和 64 位平台上的应用程序
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
我在使用 Crystal Reports 8.5 的遗留应用程序中遇到了类似的情况。 CR 报告查看器有一个“导出”按钮,它会弹出一个对话框,让您选择一个“目标”,其中之一是“Microsoft Mail (MAPI)”。在 Windows 7 上导出到 MAPI 失败。
显然,该问题是由于 Microsoft 放弃了对 Windows 7 中“简单 MAPI”的支持。
我们能够使用 Microsoft 的此修补程序解决该问题:
http://support.microsoft.com/kb/980681
这里有一些其他讨论,可能是对遇到类似问题的任何人都有帮助:
I experienced something like this with a legacy application using Crystal Reports 8.5. The CR report viewer has an "Export" button which brings up a dialog which lets you pick a "Destination", one of which is "Microsoft Mail (MAPI)". Exporting to MAPI was failing on Windows 7.
Apparently the problem was due to Microsoft dropping support for "Simple MAPI" in Windows 7.
We were able to resolve the problem with this hotfix from Microsoft:
http://support.microsoft.com/kb/980681
Here's some other discussion which might be helpful for anyone with a similar problem:
试试这个
Try this
具体关于 MAPI 不确定,但如果它是在 .NET 中完成的,则可以
not sure specifically in regards to MAPI, but can be if its done in .NET