代码之家  ›  专栏  ›  技术社区  ›  Dan Andreatta

MAPI Windows 7 64位

  •  4
  • Dan Andreatta  · 技术社区  · 15 年前

    我有一个遗留应用程序,它创建一个带有附件的电子邮件。代码使用MAPI接口创建邮件。这段代码已经运行了很长一段时间。

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

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

    4 回复  |  直到 12 年前
        1
  •  7
  •   Dan Andreatta    15 年前

    这个问题似乎取决于您使用的api调用。

    对mapiSendmail的调用应该可以正常工作。

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

    一般来说,32位MAPI应用程序必须先作为64位应用程序重建,然后才能在64位平台(64位Windows上的64位Outlook)上运行。

    有关详细说明,请参见 Building MAPI Applications on 32-Bit and 64-Bit Platforms

        2
  •  1
  •   Jeff Roe    14 年前

    我在使用CrystalReports8.5的遗留应用程序中遇到了类似的情况。CR报表查看器有一个“导出”按钮,它会弹出一个对话框,允许您选择一个“目的地”,其中一个是“Microsoft Mail(MAPI)”。在Windows 7上导出到MAPI失败。

    很明显,这个问题是由于微软放弃了对Windows7中“简单MAPI”的支持。

    我们可以从Microsoft解决此修补程序的问题: http://support.microsoft.com/kb/980681

    以下是其他一些可能对有类似问题的人有帮助的讨论:

        3
  •  1
  •   kleopatra Aji kattacherry    12 年前

    试试这个

    @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 administrator@domain: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 administrator@domain:F
    ren c:\windows\sysWOW64\mapi32.dll c:\windows\sysWOW64\mapi32.dll.ORIGINAL
    copy mapi32.dll c:\windows\sysWOW64\mapi32.dll
    :END
    
        4
  •  -2
  •   Keith Nicholas    15 年前

    不确定是否与MAPI有关,但可以在.NET中完成