简体   繁体   English

2010年展望

[英]outlook 2010 closeevent

How to attach a handler when the user is closing outlook? 用户关闭Outlook时如何附加处理程序?

private void ThisAddIn_Shutdown(object sender, System.EventArgs e) basicly doesn't work. 私有无效ThisAddIn_Shutdown(object sender,System.EventArgs e)基本上不起作用。

in here: VSTO Outlook integration - Outlook shutdown event for synchronization 此处: VSTO Outlook集成-Outlook关闭事件以进行同步

I've found a suggestion to hook up to Explorer.Close() and Inspector.Close(). 我发现了一个建议连接到Explorer.Close()和Inspector.Close()。

In here: http://social.msdn.microsoft.com/forums/en-US/vsto/thread/7e3c3a98-2b01-4def-a83c-f560e4672e73 在这里: http : //social.msdn.microsoft.com/forums/en-US/vsto/thread/7e3c3a98-2b01-4def-a83c-f560e4672e73

Helmut is attaching a handler like this: Helmut正在附加这样的处理程序:

_Inspector = inspector as Outlook.InspectorClass;

// register for the close event - used to release ourself from memory - intercept the close event

_Inspector.InspectorEvents_Event_Close += new Outlook.InspectorEvents_CloseEventHandler(_Inspector_InspectorEvents_Event_Close);

but there is no way I could repeat it on my machine (maybe it's my newer outlook...) 但是我无法在我的机器上重复它(也许这是我的新观点...)

Anyone could help? 有人可以帮忙吗?

You Must Inject file Into OUTLOOK.EXE process and in this dll you must Do Handle for WM_CLOSE message in WndProc. 您必须将文件注入OUTLOOK.EXE进程中,并且在此dll中,必须在WndProc中为WM_CLOSE消息进行处理。 Try This Link : How to Handle WNDPROC . 试试这个链接: 如何处理WNDPROC And this link explain you everything but this is about GETMINMAXINFO message you have WM_CLOSE : All About Injecting int WNDPROC 并且此链接向您解释了一切,但这只是关于您拥有WM_CLOSE的GETMINMAXINFO消息: 关于注入int WNDPROC的全部

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM