COM Addin disabled with no seemed reason

S

see_sharp

Hello,

The following regards Outlook and Word 2003 COM ATL addins.
Sometimes the application stops loading the addin, while it's not appearing
in the help->about dialog box in the disabled addins list, nor in the COM
Addins dialog box. Trying to add it again in the COM Addins dialog fails with
no message. It just doesn't show it.
Registry looks ok, and regsvr32 works successfuly.
The only way we can re-install the addin is to move it to a newly created
directory on the disk, which of course cannot be done in the end-user side.
I tried to look for articles describing the problem, and found nothing.

Please help.

Thanks in advance.
 
K

Ken Slovak - [MVP - Outlook]

Does the value of LoadBehavior change from 3 when this happens?

Do you have any logging code that would show if your OnConnection() event
handler is even being called? What about any exceptions in OnConnection() or
the other IDTExtensibility events?

Does this happen on only certain machines or on all machines? If only on
some then see what else is running on those machines that might cause
problems or what might be missing from your dependencies on those machines.
 
S

see_sharp

Ken Slovak - said:
Does the value of LoadBehavior change from 3 when this happens?

Even if I delete the whole registry info, including LoadBehaviour, and
register the dll again - it won't load.
Do you have any logging code that would show if your OnConnection() event
handler is even being called? What about any exceptions in OnConnection() or
the other IDTExtensibility events?

It doesn't even reach OnConnection.
Does this happen on only certain machines or on all machines?

All machines, after working a bit with the dll and some crashes.

Thanks for your help.
 
K

Ken Slovak - [MVP - Outlook]

If it gets disabled on all machines and never hits OnConnection then it's a
load error. That means either you aren't setting up your deployment
correctly and deploying all dependencies or checking for them, are using a
different version of the PIAs for Office/Outlook.Word, etc. Check for that.

You don't say if your code is managed or unmanaged, so I don't know if
something like strong naming or setting up CAS security could be a cause.

What would be the result of moving the addin to a newly created directory
that you say is the only way to get the addin to work?
 
S

see_sharp

It happens that a user works with the addin, and one day it just stops
working. So it's not a dependencies/deployment problem.
The addin is written in unmanaged ATL.
 
K

Ken Slovak - [MVP - Outlook]

Addins don't just stop working unless they're disabled due to an unhandled
exception. If in cases where the addin is being disabled the LoadBehavior
key is being changed to 2 from 3 that's the most likely problem. See if in
those cases there's a Resiliency registry key that appears or if the addin
is listed as disabled in the Disabled Items dialog. If that's the case then
you need to see where you might have unhandled exceptions.
 
S

see_sharp

I tried this.
We are working on this issue for more than 6 months, and made a lot of
research.
Tried everything in the registry, including LoadBehaviour and Resiliency.
We also tried MS support through HP, and they didn't know how to solve the
problem.
It's true that this might happen because of crashes or exceptions, but
sometimes the application shows no information about the addin being
disabled, and the registry looks just fine.
 
K

Ken Slovak - [MVP - Outlook]

Well, I can't think of anything else. I've never seen what you describe. All
I can think of is to open a support case directly with MS rather than
through HP and see if they can help.
 
N

Nick Hebb

Well, I can't think of anything else. I've never seen what you describe. All
I can think of is to open a support case directly with MS rather than
through HP and see if they can help.

--
Ken Slovak
[MVP - Outlook]http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Optionshttp://www.slovaktech.com/products.htm


I tried this.
We are working on this issue for more than 6 months, and made a lot of
research.
Tried everything in the registry, including LoadBehaviour and Resiliency.
We also tried MS support through HP, and they didn't know how to solve the
problem.
It's true that this might happen because of crashes or exceptions, but
sometimes the application shows no information about the addin being
disabled, and the registry looks just fine.

This is a long shot, but...

I've had an issues with the same symptoms. I discovered that the add-
in was showing up in two places in the registry:
HKEY_CURRENT_USER\Software\Microsoft\Office\Excel\Addins\
HKEY_LOCAL_MACHINE\Software\Microsoft\Office\Excel\Addins\

My installer sets the registry entries for all users in HKLM, so I'm
not sure how the double registry entry happens. I do know that
removing the HKCU registry entry makes add-in load fine again.

If anyone has any theories as to what might cause the double registry
entries in both HKLM and HKCU, I've love to hear them.

N. Hebb
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top