Why COM add-in won't run without notice nor error message? RRS feed

  • Question

  • 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!

    • Moved by David DoBell Tuesday, September 9, 2008 8:25 PM Thread is not related to Microsoft Interoperability (Moved from Interoperability Conversations to Off-Topic Posts (Do Not Post Here))
    Monday, September 8, 2008 4:36 PM


All replies

  • 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\Outlook\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 here: http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx.  If you are using Windows Vista, you can download ProcMon by doing the following Start > Run > \\live.sysinternals.com\Files\ProcessMonitor.zip.
    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?
    Tuesday, September 9, 2008 12:26 AM
  • 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\Quinoa.Connect    SUCCESS    Desired Access: Read/Write
    310984    10:10:40,9061745    OUTLOOK.EXE    2760    RegQueryValue    HKCU\Software\Microsoft\Office\Outlook\Addins\Quinoa.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\Quinoa.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\Quinoa.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!


    Tuesday, September 9, 2008 8:51 AM
  • Hi Ced,

    The moderator of this forum has asked me to move this thread to a more appropiate forum.

    Let's continue the discussion here: microsoft.public.outlook.program_addins:


    I have moved this entire post to that newsgroup and have included the next steps that I would like you to try.  Once you complete them you can reply to that thread on that forum.

    Thanks, sorry about the confusion.
    Tuesday, September 9, 2008 1:17 PM