I think I found another issue with SP2 an outlook addins.
Our addin is configurable to close our main application when outlook is
stopped.
Til Office 2007 SP1 everything ran just fine. After installing SP2 our
applications
isn't stopped anymore. It seems, CWinApp::ExitInstance() isn't called
anymore in
the addin and thats exactly where we stop the external app.
Any ideas or hints? Solutions preferred :))
--Thomas
How about IDTExtensibility2::OnDisconnection?
--
SvenC
> How about IDTExtensibility2::OnDisconnection?
This means to implement another interface just to repair a broken
functionality. But ok, I'll have a look at this interface.
Thanks for the tip.
--Thomas
"Minor, Thomas" <Thomas...@newsgroup.nospam> wrote in message
news:uYd2E$C6JHA...@TK2MSFTNGP02.phx.gbl...
But when writing an Office COM addin you will have to implement
IDTExtensibility2 anyways or how did you do it?
--
SvenC
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
"SvenC" <Sv...@nospam.nospam> wrote in message
news:uXsf8iD6...@TK2MSFTNGP05.phx.gbl...
> But when writing an Office COM addin you will have to implement
> IDTExtensibility2 anyways or how did you do it?
My fault. Our integration consists of 2 modules.
First, we have a ComAddin and of course it implements IDTExtensibility2.
Our problem is the other module, an Exchange Client Extension.
Here we free some resources and stop our processesin the ExitInstance
handler. And exactly this one isn't called anymore.
It seems, that my DllMain() isn't called when Outlook unloads.
This is a bit unpleasant.
--Thomas
Maybe some code crashes Outlook before your DllMain could be
called. How about putting the ExitInstance code into the destructor
of your ECE class? Or even better move it into you COM Addin
as ECE is deprecated and seems to be removed in Outlook 2010.
--
SvenC
> Maybe some code crashes Outlook before your DllMain could be
> called. How about putting the ExitInstance code into the destructor
> of your ECE class? Or even better move it into you COM Addin
> as ECE is deprecated and seems to be removed in Outlook 2010.
I tried the destructor trick almost as the first thing, but then outlook
died
when I configured our custom property shield. In this case there will be
another
ECE object created and destroyed and everything after that fails miserably.
Not very astonishing, though :)
Next thing was impementing a static reference counter, but this also failed
because the outlook process gets wiped out of memory with two reference
left ^^
The solution that works for me at the moment is to call ExitInstance() in
the
destructor of my ECE class only when the initializing context was
EECONTEXT_VIEWER.
This seems to be the last call to the destructor. As long as it works for
me, I wont do
any more research. But I'll keep the complete removal of the ECE class on my
task list.
--Thomas
I had to dig in further and found, that the object created for
EECONTEXT_TASK and EECONTEXT_SESSION are not released properly. That way the
cleanup code depending on those events/releases are not covered anymore. Can
anyone confirm this behaviour with Office 2007 SP2?
--Thomas
I would suggest that you eliminate MFC. Over the years I have found that
using MFC in a COM environment only leads to trouble - mostly threading
issues.
That is just my suggestion. There is nothing worse than finishing a project
and running into MFC related issues and that is what I believe you are
experiencing.
Thanks,
Tom
"Minor, Thomas" <Thomas...@newsgroup.nospam> wrote in message
news:681F4F07-3544-4CE5...@microsoft.com...
> I would suggest that you eliminate MFC. Over the years I have found that
> using MFC in a COM environment only leads to trouble - mostly threading
> issues.
Since this is not a small addin and it ran flawlessly _before_ SP2,
I'd rather like to find a fix/workaround ...
--Thomas
It seems rather obvious to me that you have a thread hanging around. Perhaps
with an earlier versions of office you had gotten away with the issue.
I suggest that you start commenting out code until you get a successful
shutdown.
I believe that your shutdown issue has nothing to do with Office 2007 SP2.
It is just a coincidence of events that you associate with Office 2007 SP2.
I think you should try the following.
1. Comment out code until the issue goes away.
2. Look for unreleased pointers
3. Look for threads that are not properly terminated.
I have designed countless add-ins and I have never seen a shutdown problem
that was not related to a thread not properly shutting down.
Do you startup any custom threads?
Are you releasing all interfaces?
Are you deleting allocated memory improperly - delete[]?
Are you trying to implement free threading?
Tom -
"Minor, Thomas" <Thomas...@newsgroup.nospam> wrote in message
news:OE9LpRZ%23JHA...@TK2MSFTNGP05.phx.gbl...
I can definitely confirm this problem, it works this way for my ECE as
well.
I found out that disabling Fast shutdown will help. See this article:
http://blogs.msdn.com/stephen_griffin/archive/2009/03/03/fastest-shutdown-in-the-west.aspx
Petr
On 30 čvn, 15:32, "Minor, Thomas" <Thomas.Mi...@newsgroup.nospam>
wrote: