MAPISendMail邮件窗口正在申请中 [英] MAPISendMail mail window is under application

查看:80
本文介绍了MAPISendMail邮件窗口正在申请中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用MAPISendMail的64位应用程序。我们有一个客户报告了一个奇怪的问题,当我们在11月7日进行测试时,我们调用了一天刚出现的API时启动的邮件窗口。用户在Windows8上说(并声称Windows7
在他的双显示器配置中,他停靠笔记本电脑(一台Win7,一台Win8),他可以在他的左侧显示器上放置Outlook(来自Office 2010)和我们的应用程序彼此相邻(他们之间留有一些空间)并运行我们的发送邮件命令
我们附加我们的一个文档(MFC应用程序)并调用MAPISendMail。结果可能是显示的邮件窗口位于Outlook和我们的应用程序下面。

I have a 64 bit app that uses MAPISendMail. We have a client that has reported an odd issue with the mail window that launches when we call the API that just showed up one day when he was testing on Nov. 7. The user says on Windows8 (and claims on Windows7 too) that on his dual monitor configuration where he docks his laptops (one Win7, one Win8), he can put both Outlook (from Office 2010) and our application next to each other (he leaves some space between them) on his left monitor and run our send mail command where we attach one of our documents (MFC application) and make a call to MAPISendMail. The result can be that the mail window that displays is underneath both Outlook and our application.

以下是他要做的事情。他首先单击Outlook(在标题栏中)以设置焦点。然后他点击我们的标题栏,然后点击我们的应用程序图标(基于Fluent UI的应用程序),当我们的下拉列表显示时,他点击我们的发送条目,在
弹出窗口中我们显示他点击了我们的发送邮件命令。使用该工作流程,邮件窗口将显示在两个应用程序下。他声称这是一个回归。我有一个带有双显示器,64位操作系统等的桌面,但无法复制问题。

Here is what he does to get that to occur. He first clicks Outlook (in the title bar) to set focus there. Then he clicks our title bar and then our application icon (Fluent UI based app) and when our dropdown shows up, he clicks our send entry and on the popup we show he clicks our send mail command. With that workflow, the mail window shows up under both apps. He claims that is a regression. I have a desktop with dual monitors, 64 bit OS etc. but could not duplicate the issue.

我查看了对MAPISendMail的调用,发现我们没有发送"ulUIParam"。 (父窗口)所以我这样做了。在我的机器上没有区别所以我检查了修复程序并且用户拉出了产品。之后,窗口始终显示在Outlook
和我们的应用程序之上。很棒。

I looked at our call to MAPISendMail and noticed we did not send in the "ulUIParam" (parent window) so I did so. No difference on my machine so I checked in the fix and the user pulled the product. After that, the window always appears on top of both Outlook and our app. Great.

不幸的是,我们是一个OLE应用程序,在测试中,用户没有及时发送邮件,并且用户得到了"服务器忙"信息。对话。我测试了这一点,果然我也得到了它。但是我无法逃脱对话(他也不能)。当
我重试时,它会很快出现,所以我没有机会发送邮件。所以我在服务器繁忙的对话框上进行了间谍,看到它属于我们的应用程序。所以我使用任务管理器来杀死我们的进程(树)。发送邮件窗口仍保留在桌面上。一旦我将应用程序窗口句柄添加到Outlook中,即使我发送邮件之前,Outlook也已经不知情,我是否提到了
?好吧,我的应用程序已经消失,发送邮件窗口仍然显示,Outlook被锁定。不太像发送邮件窗口是Outlook的模式,因为单击
Outlook不会导致发送邮件窗口闪烁多次(在服务器忙对话框之前单击我的窗口会导致发送邮件窗口像闪存一样闪烁模态对话框确实)。由于Outlook已被锁定,我通过任务管理器将其杀死(Outlook然后
告诉我我的系统资源不足)。

Unfortunately, we are an OLE app and in testing the user did not send the mail in a timely manner and got the user gets the "server busy" dialog. I tested that and sure enough I got it too. However I could not escape the dialog (nor could he). When I did retry it comes up quickly so I don't have a chance to send the mail. So I spied on the server busy dialog and saw it belonged to our app. So I used task manager to kill our process (tree). The send mail window remained on the desktop. Did I mention that once I added our app window handle to the call that Outlook is also incapicitated until I send the mail? Well my app is gone, the send mail window is still displayed and Outlook is locked down. Not quite like the send mail window is modal to Outlook as clicking Outlook doesn't cause the send mail window to flash a number of times (clicking my window before the server busy dialog causes the send mail window to flash like a modal dialog does). Since Outlook was locked up, I killed it via task manager (Outlook then tells me I am out of system resources).

然后我回到我的应用项目并设置OleMessageFilter参数,用于防止在MAPISendMail调用期间出现服务器繁忙对话框(较大的挂起延迟和重试值)。我也叫BeginBusyState。这几乎解决了大部分
的问题。但困扰我的是,现在Outlook仍然无法使用,直到用户真正解除发送邮件对话框(通过发送或只是关闭它而不发送)。我怀疑这个用户最终会注意到并报告另一个回归问题
报告。

I then went back to my app project and set the OleMessageFilter parameters to prevent the server busy dialog from appearing (large pending delay and retry values) during the MAPISendMail call. I also called BeginBusyState. That pretty much solves most of the issues. But what bothers me is that now Outlook is still unusable until the user actually dismisses the send mail dialog (via send or just closes it out without sending). I suspect this user will eventually notice that and file another regression problem report.

我们的代码库  我们的发送邮件功能自2006年以来没有变化。正如我所说起初我无法复制这个问题。但是今天(我做了修复后的两周),我可以将问题重复一半。我将更改退回到
通过我的窗口句柄并再次尝试工作流程,我可以在我们的应用程序下找到发送邮件窗口,但奇怪的是,它是在Outlook上。我检查了我的mapi32.dll版本(确保我检查了加载到我们进程中的那个)和
我看到它是版本6.1.7601.17514并且是从2010年11月20日。这似乎排除了对该DLL的任何自动更新更改(自动更新可以解释出现的回归)。

Our codebase  for our send mail functionality has not changed since 2006. And as I said at first I could not duplicate the issue. But now today (two weeks after I made the fix) I can halfway duplicate the issue. I backed out the change to pass my window handle in and tried the workflow again and I can get the send mail window to come up under our app, but oddly enough, it is over Outlook. I checked my version of mapi32.dll (making sure I examined the one that is loaded into our process) and I see that it is version 6.1.7601.17514 and is from 11/20/2010. That seems to exclude any automatic update change to that DLL (automatic updates could explain a regression appearing).

顺便说一句,我为会话句柄传递零并将标志设置为:

By the way, I pass in zero for the session handle and set the flags to:

MAPI_DIALOG | MAPI_LOGON_UI

MAPI_DIALOG | MAPI_LOGON_UI

是否有人看到或听说过此问题?看来发送邮件窗口不是我们的应用程序和/或Outlook的顶级窗口。但我无法控制API。

Has anybody seen or heard about this issue? It appears that the send mail window is not a top window wrt our application and/or Outlook. But I have no control over that with the API.

我会附上客户端发给我的avi,显示此行为。但是附件文件功能在哪里?

I would attach the avi the client sent me showing this behavior. But Where is the attach file capability?

R.D。荷兰

推荐答案

嗨RD Holland,

Hi R.D. Holland,

谢谢在MSDN论坛上发帖。

Thank you for posting in the MSDN Forum.

我会让一些更熟悉你的问题的专家参与进来。这可能需要一些时间。

I'll involve some experts who are more familiar with your issue. This may take some time.

感谢您的耐心和理解。

祝你好运,

这篇关于MAPISendMail邮件窗口正在申请中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆