D
Dieter Verlaeckt
Hi,
I'm developing a COM-addin for Outlook in VC++ .NET using ATL/MFC.
My addin manipulates some items in Outlook when the user clicks a button on
a custom toolbar. The operation is lengthy, so i do it in a seperate worker
thread. Everything works fine and the threads can be stopped cleanly when
Outlook is running.
The problems occur when Outlook is shut down when the thread is still
running. It seems that the thread simply gets stopped (killed?suspended?) on
shutdown. I have tried to intercept Outlook shutdown in OnBeginShutdown,
OnDisconnection, and in the close event of the main explorer, but the thread
seems to have already stopped at those stages.
So my question is:
How do I prevent Outlook from shutting down until my thread has finished?
TIA
Dieter
I'm developing a COM-addin for Outlook in VC++ .NET using ATL/MFC.
My addin manipulates some items in Outlook when the user clicks a button on
a custom toolbar. The operation is lengthy, so i do it in a seperate worker
thread. Everything works fine and the threads can be stopped cleanly when
Outlook is running.
The problems occur when Outlook is shut down when the thread is still
running. It seems that the thread simply gets stopped (killed?suspended?) on
shutdown. I have tried to intercept Outlook shutdown in OnBeginShutdown,
OnDisconnection, and in the close event of the main explorer, but the thread
seems to have already stopped at those stages.
So my question is:
How do I prevent Outlook from shutting down until my thread has finished?
TIA
Dieter