开发者

outlook 2010 closeevent

How to attach a handler when the user is closing outlook?

private void ThisAddIn_Shutdown(object sender, System.EventArgs e) basicly doesn't work.

in here: VSTO Outlook integration - Outlook shutdown event for synchronization

I've found a suggestion to hook up to Explorer.Close() and Inspector.Close().

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

Helmut is attaching a handler like this:

_Inspector = inspector as Outlook.InspectorClass;

// register for the close event - used to release our开发者_StackOverflow社区self 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. Try This Link : How to Handle WNDPROC. And this link explain you everything but this is about GETMINMAXINFO message you have WM_CLOSE : All About Injecting int WNDPROC

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜