developer_cp
Posts: 48
Joined: 2016-10-28
|
Hi guys,
I am facing some issue with Outlook shutting down too fast before my clean up code is done.. is there a way to kind a "slow it down" or "wait for me" during the shutdown process?
I've the following hooks in ADX:
private void AddinModule_AddinBeginShutdown(object sender, EventArgs e)
{
// AddinModule_AddinBeginShutdown is for Outlook 2000 - 2007 (usual way)
logger.Debug("AddinModule_AddinBeginShutdown");
BeginShutdown();
}
private void AddinModule_AddinFinalize(object sender, EventArgs e)
{
logger.Debug("AddinModule_AddinFinalize");
// AddinModule_AddinFinalize is for Outlook 2010 - perform clean-up for Outlook 2010 Fast Shutdown
ShutdownFinalize();
}
private void adxOutlookEvents_Quit(object sender, EventArgs e)
{
logger.Debug("adxOutlookEvents_Quit");
if (this.OutlookShutdownBehavior == OutlookShutdownBehavior.Fast)
{
Shutdown();
}
}
private void Shutdown()
{
BeginShutdown();
ShutdownFinalize();
}
In one of my shutdown procedure, I try to iterate through all my stores to delete a temporarily working folder and various other routines, but every-time I close Outlook, it just stops somewhere in the middle, and is never the same spot. Sometimes it gets further, sometimes not.
Is there a way to wait until all my shutdown routines are completed before letting Outlook to close? |
|
Andrei Smolin
Add-in Express team
Posts: 18830
Joined: 2006-05-11
|
|