Outlook shutting down too fast?

Add-in Express™ Support Service
That's what is more important than anything else

Outlook shutting down too fast?
 
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?
Posted 28 Nov, 2016 17:06:53 Top
Andrei Smolin


Add-in Express team


Posts: 14129
Joined: 2006-05-11
Hello Eric,

developer_cp writes:
I am facing some issue with Outlook shutting down too fast before my clean up code is done... s there a way to wait until all my shutdown routines are completed before letting Outlook to close?


Please check Outlook 2010 Fast Shutdown feature

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 29 Nov, 2016 02:10:07 Top