Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Add-ins for Outlook (http://www.outlookbanter.com/add-ins-outlook/)
-   -   Detect logoff/shutdown (http://www.outlookbanter.com/add-ins-outlook/92891-detect-logoff-shutdown.html)

j July 21st 09 02:05 PM

Detect logoff/shutdown
 
Hi,

I'm developing shared AddIn for Outlook 2003, C# 2.0.

i catch the system's logoff/shutdown occurence.
i tried to use diferent events from but
Microsoft.Win32.

SystemEvents. ....
they are not fired.


any suggesiotn.

Ken Slovak - [MVP - Outlook] July 21st 09 03:42 PM

Detect logoff/shutdown
 
In an addin for Outlook 2003 you should be handling OnDisconnection() anyway
from the Extensibility interface. In addition, for 2003 and earlier you need
to handle Explorer.Close() and Inspector.Close() and if in either of those 2
event handlers there are no more Explorers and no Inspectors then you
release all of your Outlook objects so that OnDisconnection() can fire. You
also should have a OnBeginShutdown() handler of course for the Extensibility
interface.

I handle both of those Extensibility interface events plus the 2 Close()
events and from there call my teardown code.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"j" wrote in message
...
Hi,

I'm developing shared AddIn for Outlook 2003, C# 2.0.

i catch the system's logoff/shutdown occurence.
i tried to use diferent events from but
Microsoft.Win32.

SystemEvents. ....
they are not fired.


any suggesiotn.




All times are GMT +1. The time now is 08:48 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com