M
Michael
I am writing an Outlook XP/2003 COM Add-in in C# (Visual Studio .NET 2003).
My add-in loads with Outlook and runs successfully. However, I also have a
separate C# application which creates an Outlook Application instance (e.g.
Outlook.Application olApp = new Outlook.ApplicationClass() and passes that
to some of the methods in my add-in dll to read data in the Outlook Object
Model (in the add-in I get the application object in the OnConnection
method). For instance, the program might look in a specific folder for
tasks and read some built-in and custom fields. The application only reads
information; it does not change/write anything.
If I run Outlook without the application running, it works fine. If I run
the application without Outlook running, it also works fine... it creates
the Outlook.exe process (which takes many many seconds to initialize while
it does an initial Send/Receive, etc.) while it is accessing the object
model and the process goes away about 5-10 seconds after the application
exits.
However, when I try to run them together, I'm experiencing strange problems
which I am still investigating. The problems seem to be different,
depending on which app I start first, some of which stems from it loading at
times with an Explorer (Outlook) and other times without an Explorer (C#
application). NOTE: The add-in is not currently loaded using a Shim, though
I plan on doing that soon (if that makes any difference).
Without getting into too many details of the problems in this post, which is
already long, I was wondering if this scenario is even acceptable, and if
not, how might I approach it differently?
Michael
My add-in loads with Outlook and runs successfully. However, I also have a
separate C# application which creates an Outlook Application instance (e.g.
Outlook.Application olApp = new Outlook.ApplicationClass() and passes that
to some of the methods in my add-in dll to read data in the Outlook Object
Model (in the add-in I get the application object in the OnConnection
method). For instance, the program might look in a specific folder for
tasks and read some built-in and custom fields. The application only reads
information; it does not change/write anything.
If I run Outlook without the application running, it works fine. If I run
the application without Outlook running, it also works fine... it creates
the Outlook.exe process (which takes many many seconds to initialize while
it does an initial Send/Receive, etc.) while it is accessing the object
model and the process goes away about 5-10 seconds after the application
exits.
However, when I try to run them together, I'm experiencing strange problems
which I am still investigating. The problems seem to be different,
depending on which app I start first, some of which stems from it loading at
times with an Explorer (Outlook) and other times without an Explorer (C#
application). NOTE: The add-in is not currently loaded using a Shim, though
I plan on doing that soon (if that makes any difference).
Without getting into too many details of the problems in this post, which is
already long, I was wondering if this scenario is even acceptable, and if
not, how might I approach it differently?
Michael