S
seacuke
Hello,
I'm writing an add-in for Outlook 2000/2002/2003. I'm using Outlook
9 DLLs as my references and everything seems fine... except the
exiting.
On OLK2000, the Outlook process just sits there in the task manager
(more on this later), and in OLK2003 I get the dreaded "5-6 second
delay" mentioned in several other threads I've read.
The Add-in is written in C#.
In the other threads I've read on this topic I've seen references to
monitoring for Explorer.Close and Inspector.Close events. Here's what
I've been able to figure out on that front:
public void OnStartupComplete(ref System.Array custom)
{
...
activeExplorer = ApplicationObject.ActiveExplorer();
if (activeExplorer != null)
{
...
activeExplorer.Deactivate+=new
Outlook.ExplorerEvents_DeactivateEventHandler(activeExplorer_Deactivate);
...
}
}
The active explorer deactivation above is pretty straight forward,
and activeExplorer_Deactivate is being called, and the activeExplorer
seems to be being released. If I start Outlook and immediately exit
(without doing anything), the Outlook process is shut down properly.
However, if I move folders or create a new email message, or anything
other than immediately exit, the Outlook process hangs out.
What I can't figure out how to capture the close events for all of the
active inspectors. I'm capturing the inspectorClass_NewInspector event
and fooling with the new mail messages when they're created. The
Outlook.InspectorsClass does not have an event for any kind of
closedown.
In the inspectorClass_NewInspector method I have a reference to the new
Outlook.Inspector being created, but how do I make sure the right
inspector is being released on shutdown?
Or maybe if I phrase it differently, how do I monitor for
Explorer.Close and Inspector.Close events for each individual Explorer
and/or Inspector? Capturing the events is easy enough, but how do I
associate a particular event with a particular explorer/inspector?
And more importantly, is this going to solve the problem?!
Thanks in advance,
brian
I'm writing an add-in for Outlook 2000/2002/2003. I'm using Outlook
9 DLLs as my references and everything seems fine... except the
exiting.
On OLK2000, the Outlook process just sits there in the task manager
(more on this later), and in OLK2003 I get the dreaded "5-6 second
delay" mentioned in several other threads I've read.
The Add-in is written in C#.
In the other threads I've read on this topic I've seen references to
monitoring for Explorer.Close and Inspector.Close events. Here's what
I've been able to figure out on that front:
public void OnStartupComplete(ref System.Array custom)
{
...
activeExplorer = ApplicationObject.ActiveExplorer();
if (activeExplorer != null)
{
...
activeExplorer.Deactivate+=new
Outlook.ExplorerEvents_DeactivateEventHandler(activeExplorer_Deactivate);
...
}
}
The active explorer deactivation above is pretty straight forward,
and activeExplorer_Deactivate is being called, and the activeExplorer
seems to be being released. If I start Outlook and immediately exit
(without doing anything), the Outlook process is shut down properly.
However, if I move folders or create a new email message, or anything
other than immediately exit, the Outlook process hangs out.
What I can't figure out how to capture the close events for all of the
active inspectors. I'm capturing the inspectorClass_NewInspector event
and fooling with the new mail messages when they're created. The
Outlook.InspectorsClass does not have an event for any kind of
closedown.
In the inspectorClass_NewInspector method I have a reference to the new
Outlook.Inspector being created, but how do I make sure the right
inspector is being released on shutdown?
Or maybe if I phrase it differently, how do I monitor for
Explorer.Close and Inspector.Close events for each individual Explorer
and/or Inspector? Capturing the events is easy enough, but how do I
associate a particular event with a particular explorer/inspector?
And more importantly, is this going to solve the problem?!
Thanks in advance,
brian