gpt4 book ai didi

Delphi MapiSendMail 在 Windows 7 64 位上崩溃

转载 作者:行者123 更新时间:2023-12-01 22:41:13 25 4
gpt4 key购买 nike

我有 Windows 7 64 位,当我尝试第二次发送电子邮件或者有时甚至只是等待第一次发送邮件完成时,我的 delphi sendmail 崩溃了。同一应用程序适用于 Windows Vista。

以下是我发送邮件的测试过程:

procedure TForm1.SendMail(const Subject, FileName: String);
var tmpName2, PFullFilePath, PSubject : Array[0..MAX_PATH] of AnsiChar;
MapiMessage : TMapiMessage;
MapiFileDesc : TMapiFileDesc;
MError : Cardinal;
begin
with MapiFileDesc do
begin
ulReserved:=0;
flFlags:=0;
nPosition:=Cardinal(-1);
StrPCopy(PFullFilePath, FileName);
lpszPathName:=PFullFilePath;
StrPCopy(tmpName2,ExtractFileName(FileName));
lpszFileName:=tmpName2;
lpFileType:=nil;
end;

with MapiMessage do
begin
ulReserved := 0;
StrPCopy(PSubject, Subject);
lpszSubject := PSubject;
lpszNoteText := nil;
lpszMessageType := nil;
lpszDateReceived := nil;
lpszConversationID := nil;
flFlags := 0;
lpOriginator := nil;
nRecipCount := 0;
lpRecips := nil;
nFileCount := 1;
lpFiles := @MapiFileDesc;
end;

MError:=MapiSendMail(0,Application.Handle, MapiMessage, MAPI_DIALOG or MAPI_LOGON_UI or MAPI_NEW_SESSION, 0);

if MError<>0 then
Raise Exception.CreateFmt(IntToStr(MError), [MError]);
end;

我收到的错误/崩溃消息:

Problem signature:
Problem Event Name: APPCRASH
Application Name: mapitestp.exe
Application Version: 0.0.0.0
Application Timestamp: 4d82c905
Fault Module Name: ntdll.dll
Fault Module Version: 6.1.7600.16559
Fault Module Timestamp: 4ba9b29c
Exception Code: 4000001f
Exception Offset: 000a1dcf OS Version: 6.1.7600.2.0.0.256.1
Locale ID: 1033
Additional Information 1: d1ab
Additional Information 2: d1ab624ec7d094c26a73530c245a3468
Additional Information 3: d1ab
Additional Information 4: d1ab624ec7d094c26a73530c245a3468

任何帮助或想法将不胜感激。谢谢

最佳答案

看看这个 Link在 Embarcadero,这可能是一些 Unicode 问题。

希望对您有帮助。

关于Delphi MapiSendMail 在 Windows 7 64 位上崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5347922/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com