View Single Post
  #1  
Old September 9th 08, 02:04 PM posted to microsoft.public.outlook.program_addins
Dave [MSFT]
external usenet poster
 
Posts: 1
Default Why COM add-in won't run without notice nor error message?

Hi Ced,

Your application is definately managed. You are using what is called a
shared COM Addin. These are different from VSTO in that they use the
standard CLR COM Interop layer.

Here is what I say you should try next:

1. Confirm that the .NET Framework is installed on the client that you are
having a problem on. If you have not installed the .NET Framework,
mscoree.dll will not be on the machine.
2. Confirm that a simple vbscript can create your .NET object. Create a
vbscript with the following code:
code
Option Explicit
Dim objAddin
const PROGID = "Quinoa.Connect" ' I assume this is your ProgId based on the
ProcMon

On Error Resume Next

Set objAddin = Nothing

Set objAddin = CreateObject(PROGID)

If Not objAddin Is Nothing Then
WScript.Echo "The object has been created!"
Set objAddin = Nothing
Else
WScript.Echo "The object has NOT been created!"
End If
/code
Then run the script, by either double-clicking the vbscript file or using
the following command at the command prompt : cscript scriptname.vbs. If
the code works you know that the object can be created via COM. If it
doesn't then you know it's a COM or CLR issue.

3. If the script above works, and you can create the COM object then I would
look at your start up code. Often times we see developers who have start up
code that makes assumptions about the state of Outlook or the state of the
OS. When those assumptions are wrong the Addin exits without doing any
processing and the developer assumes that his Addin wasn't loaded. One thing
that may be helpful is adding more diagnostic information in the form of
either message boxes (crud I know) or a log file. Be careful when creating a
log file because if you attempt to write to a location that you don't have
access to this will cause additional problems and more red herrings to run
down.

This is a continuation of the thread he

http://forums.community.microsoft.co...4-7a3e1652c8a4

Moving the thread to a more appropiate forum
-----------------------------------------------------------------------
Hi Dave and thank you for your help!

here are my feedbacks:

1. The load behavior was set to 3. As in the COM dialog, my plug-in is always unchecked, I would have expected it to be set to 2, but it's not the case.

2. I knew regmon and filemon... procmon is a great tool.

3. I traced all the activity related to my add-in, and there only are registry read operations (open, query, close), i.e. no reg write nor file activity. Just as if Outlook was reading 2 instead of 3. Below is a raw extract of procmon:

310983 10:10:40,9061594 OUTLOOK.EXE 2760 RegOpenKey HKCU\Software\Microsoft\Office\Outlook\Addins\Qui noa.Connect SUCCESS Desired Access: Read/Write
310984 10:10:40,9061745 OUTLOOK.EXE 2760 RegQueryValue HKCU\Software\Microsoft\Office\Outlook\Addins\Qui noa.Connect\LoadBehavior SUCCESS Type: REG_DWORD, Length: 4, Data: 3
310986 10:10:40,9061946 OUTLOOK.EXE 2760 RegOpenKey HKCU\Software\Classes\Quinoa.Connect\Clsid NAME NOT FOUND Desired Access: Query Value
310987 10:10:40,9062030 OUTLOOK.EXE 2760 RegOpenKey HKCR\Quinoa.Connect\Clsid SUCCESS Desired Access: Query Value
310988 10:10:40,9062245 OUTLOOK.EXE 2760 RegQueryKey HKCR\Quinoa.Connect\CLSID SUCCESS Query: Name
310989 10:10:40,9062376 OUTLOOK.EXE 2760 RegOpenKey HKCU\Software\Classes\Quinoa.Connect\CLSID NAME NOT FOUND Desired Access: Maximum Allowed
310990 10:10:40,9062491 OUTLOOK.EXE 2760 RegQueryValue HKCR\Quinoa.Connect\CLSID\(Default) SUCCESS Type: REG_SZ, Length: 78, Data: {4611FC4F-7B55-421A-B98B-A12A5133DC2F}
310991 10:10:40,9062599 OUTLOOK.EXE 2760 RegCloseKey HKCR\Quinoa.Connect\CLSID SUCCESS
310992 10:10:40,9062711 OUTLOOK.EXE 2760 RegQueryValue HKCU\Software\Microsoft\Office\Outlook\Addins\Qui noa.Connect\FriendlyName SUCCESS Type: REG_SZ, Length: 14, Data: Quinoa
310994 10:10:40,9062884 OUTLOOK.EXE 2760 RegOpenKey HKCU\Software\Classes\CLSID\{4611FC4F-7B55-421A-B98B-A12A5133DC2F} NAME NOT FOUND Desired Access: Read
310995 10:10:40,9062971 OUTLOOK.EXE 2760 RegOpenKey HKCR\CLSID\{4611FC4F-7B55-421A-B98B-A12A5133DC2F} SUCCESS Desired Access: Read
310996 10:10:40,9063127 OUTLOOK.EXE 2760 RegQueryKey HKCR\CLSID\{4611FC4F-7B55-421A-B98B-A12A5133DC2F} SUCCESS Query: Name
310997 10:10:40,9063256 OUTLOOK.EXE 2760 RegOpenKey HKCU\Software\Classes\CLSID\{4611FC4F-7B55-421A-B98B-A12A5133DC2F}\InprocServer32 NAME NOT FOUND Desired Access: Query Value
310998 10:10:40,9063393 OUTLOOK.EXE 2760 RegOpenKey HKCR\CLSID\{4611FC4F-7B55-421A-B98B-A12A5133DC2F}\InprocServer32 SUCCESS Desired Access: Query Value
310999 10:10:40,9063521 OUTLOOK.EXE 2760 RegQueryKey HKCR\CLSID\{4611FC4F-7B55-421A-B98B-A12A5133DC2F}\InprocServer32 SUCCESS Query: Name
311000 10:10:40,9063655 OUTLOOK.EXE 2760 RegOpenKey HKCU\Software\Classes\CLSID\{4611FC4F-7B55-421A-B98B-A12A5133DC2F}\InprocServer32 NAME NOT FOUND Desired Access: Maximum Allowed
311001 10:10:40,9063792 OUTLOOK.EXE 2760 RegQueryValue HKCR\CLSID\{4611FC4F-7B55-421A-B98B-A12A5133DC2F}\InprocServer32\(Default) SUCCESS Type: REG_SZ, Length: 24, Data: mscoree.dll
311002 10:10:40,9063901 OUTLOOK.EXE 2760 RegCloseKey HKCR\CLSID\{4611FC4F-7B55-421A-B98B-A12A5133DC2F}\InprocServer32 SUCCESS
311003 10:10:40,9063991 OUTLOOK.EXE 2760 RegCloseKey HKCR\CLSID\{4611FC4F-7B55-421A-B98B-A12A5133DC2F} SUCCESS
311004 10:10:40,9064091 OUTLOOK.EXE 2760 RegCloseKey HKCU\Software\Microsoft\Office\Outlook\Addins\Qui noa.Connect SUCCESS

Then I did the following test : I went back to outlook and tried to reactivate the add-in from the COM dialog. The "funny" thing is that when the dialog with the list of add-ins opens up, I see the same reg queries as above. But when I check my add-in and close the dialog, there isn't any activity.

Regarding the managed code, i'm not sure : I don't use VSTO but the COM interface. But behing it is a strong named assembly managed by mscoree.dll, so I'd say it's managed code.

Thank you again for your help!

Cedric.



Dave - MSFT - Posted 11 hours 46 minutes ago


Hi,


It sounds like your addin was successfully installed. I would try the following:


1. Navigate to the registry key HKEY_CURRENT_USER\Software\Microsoft\Office\Outl ook\Addins\ProgId, where ProgId is the name of the Programmatic Identifier for your COM Addin. This is most likely the name of the project.
a. Confirm that the Load Behavior is 3. If it is 2, reset it to 3
2. Download and run ProcMon. ProcMon is a free download available he http://technet.microsoft.com/en-us/s.../bb896645.aspx. If you are using Windows Vista, you can download ProcMon by doing the following Start
Run \\live.sysinternals.com\Files\ProcessMonitor.zi p.

3. Run Outlook again. If your Addin is being disabled by Outlook, you should see the LoadBehavior return to 2 from 3 in ProcMon. It may be necessary to filter the ProcMon trace to just the registry and only the process Outlook.exe.

Respond back to this forum post and let me know the results.


Also, is this managed or unmanaged code?



Hello all,
I have built a COM add-in for outlook using VS2008 express. I already had it running on some platform, but since a few time it won't run on my work PC
(outlook 2003) with the following behaviour:

I use an installer I made to have the dll installer and registered.

When I launch Outlook, the add-in doesn't show up.

I go in the options, in the COM add-in mgt dialog and I see the add-in isn't activated (while the istall ensure it is), and there isn't any error message shown like "not loaded because it crashed" or so... So I check the box and close the dialogs. The plug-in still wont run. Back to the option, still the same : unchecked, without error.

I have tried the following without any improvement:

- setting the VSTO environment variables to display error message, ifever... but nothing.

- used the Office install to repair outlook.

- uninstalled outlook and reinstalled it. Note that anyway, once Outlook was re-installed, it found alone all my previous settings with the PST I use and the connexion to the Exchange server... So it was not a real "start from scratch" I believe. would there be a way to really uninstall?

- created another COM from the same template, with the same name, which is only supposed to show a message box. as nothing changed, I can't think it's due to my code (furthermore it works fine at home).

Now what? I'd prefer formating my hard disk and re-installing properly Outlook rather than getting rid of my add-in on this PC. But there must be a better way...

Any suggestion?
Thanks in advance!

Ced.

Ads