【发布时间】:2010-05-07 11:20:25
【问题描述】:
我们的应用程序使用 Simple MAPI 发送电子邮件。我们的一位客户在其终端服务器上的会话中发送电子邮件时遇到问题。
mapi32.dll 通过调用 LoadLibrary 成功加载,但随后我们的应用程序尝试获取函数 MAPILogon、MAPILogOff、MAPISendMail、MAPIFreeBuffer 和 MAPIResolveName 的地址。问题是GetProcAddress 对那些具有ERROR_ACCESS_DENIED(代码:5)的函数失败,MAPIFreeBuffer 除外。它看起来像是某种安全性的东西。
我该如何解决这个问题,或者我应该使用其他方法发送邮件?
FWI,这里有更多关于操作系统和注册表项 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Messaging Subsystem 内容的信息:
OS info: 5.2.3790 VER_PLATFORM_WIN32_NT Service Pack 2
Contents of SOFTWARE\Microsoft\Windows Messaging Subsystem
InstallCmd: rundll32 setupapi,InstallHinfSection MSMAIL 132 msmail.inf
MAPI: 1
CMCDLLNAME: mapi.dll
CMCDLLNAME32: mapi32.dll
CMC: 1
MAPIX: 1
MAPIXVER: 1.0.0.1
OLEMessaging: 1
Contents of SOFTWARE\Microsoft\Windows Messaging Subsystem\MSMapiApps
inetsw95.exe:
choosusr.dll:
msab32.dll:
nwab32.dll:
outstore.dll: Microsoft Outlook
CDOEXM.DLL:
EMSMDB32.DLL:
EMSABP32.DLL:
newprof.exe: Microsoft Outlook
outlook.exe:
wfxmsrvr.exe: Microsoft Outlook
msexcimc.exe:
exchng32.exe:
schdmapi.dll: Microsoft Outlook
pilotcfg.exe: Microsoft Outlook
mailmig.exe: Microsoft Outlook
admin.exe:
msspc32.dll: Microsoft Outlook
cnfnot32.exe: Microsoft Outlook
ilpilot.exe: Microsoft Outlook
events.exe:
我使用的是 Delphi 7.0,但这没关系。
编辑,添加版本信息:
C:\WINDOWS\system32\mapi32.dll 的文件版本信息
Fileversion: 6.5.7226.0
FileDescription=Extended MAPI 1.0 for Windows NT
CompanyName=Microsoft Corporation
InternalName=MAPI32
Comments=Service Pack 1
LegalCopyRight=Copyright (C) 1986-2003 Microsoft Corp. All rights reserved.
LegalTradeMarks=Microsoft(R) and Windows(R) are registered trademarks of Microsoft Corporation.
OriginalFileName=MAPI32.DLL
ProductName=Microsoft Exchange
ProductVersion=6.5
C:\Program Files\Common Files\SYSTEM\MSMAPI\1043\msmapi32.dll 的文件版本信息
Fileversion: 11.0.5601.0
FileDescription=Extended MAPI 1.0 for Windows NT
CompanyName=Microsoft Corporation
InternalName=MAPI32.DLL
LegalCopyRight=Copyright © 1995-2003 Microsoft Corporation. All rights reserved.
OriginalFileName=MAPI32.DLL
ProductName=MAPI32
ProductVersion=11.0.5601
【问题讨论】:
标签: delphi api dll mapi access-denied