![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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 |
#2
|
|||
|
|||
![]()
Hi Dave,
I can't give you yet all the feedbacks (see below), but this is a quick reply just to confirm I saw that the topic had moved here. 1. The .Net framework is installed on my PC. I think version 3.5, I keep it up to date. 2. I never used VB script, so it'll take a few time before I answer your questions. 3. Good to know. I tried to make things as clean as possible, using the template code that searches for explorers and inspectors, and acting based on this. But I'll doublecheck Thanks for your help so far, I keep you posted asap. Regards, Cedric. |
#3
|
|||
|
|||
![]()
Hi Dave,
I performed the test, and it appears that the object is not created. you say it can be a CLR or COM issue. But I don't know how to move forward on this. Can you please help? Thanks! Cedric. |
#4
|
|||
|
|||
![]()
Since this thread was moved from elsewhere, I don't know if you've seen the
troubleshooting information on managed code addins at http://blogs.msdn.com/vsod/archive/2...-failures.aspx ? -- 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 "Cedric" wrote in message ... Hi Dave, I performed the test, and it appears that the object is not created. you say it can be a CLR or COM issue. But I don't know how to move forward on this. Can you please help? Thanks! Cedric. |
#5
|
|||
|
|||
![]()
Hi Ken!
The scenario described in the page you linked isn't exactly what I'm facing : If you go to COM Add-Ins dialog, it shows the add-in as unchecked, and you see an error “Not loaded. A runtime error occurred during the loading of the COM Add-In” when you select the add-in entry. = This error message didn't appear. The comm add-in is simply unchecked. If you check for the LoadBehavior for the Add-In in registry, it has changed from 3 to 2. = No, it remains set to 3. Nevertheless, I wonder about the following: - I use VS2008, maybe it uses .Net Framework 3.5? - I register my COM add in with the .Net Framework 2.0 as follows: C:\Windows\Microsoft.Net\Framework\v2.0.50727\RegA sm.exe ".\Quinoa.dll" /codebase Could this be the source of the problem? Again, I don't think so as my home PC has the add-in installed the same way and it works... Thanks for your help. Cedric. |
#6
|
|||
|
|||
![]()
Hi,
If the same addin is running on your home machine then your registration process should be OK, as long as the Framework version is there. You can set a VS 2008 addin to use Framework 2.0, and if that's what you have on your home machine then that should be OK. My guess is that you don't have a load condition or prerequisite installed where it's not working. You can check each dependency to see if it's there, but I'd be inclined to implement the Fusion logging and see what that shows. That's the most likely thing to tell you what's going on and where your addin load is failing. -- 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 "Cedric" wrote in message ... Hi Ken! The scenario described in the page you linked isn't exactly what I'm facing : If you go to COM Add-Ins dialog, it shows the add-in as unchecked, and you see an error “Not loaded. A runtime error occurred during the loading of the COM Add-In” when you select the add-in entry. = This error message didn't appear. The comm add-in is simply unchecked. If you check for the LoadBehavior for the Add-In in registry, it has changed from 3 to 2. = No, it remains set to 3. Nevertheless, I wonder about the following: - I use VS2008, maybe it uses .Net Framework 3.5? - I register my COM add in with the .Net Framework 2.0 as follows: C:\Windows\Microsoft.Net\Framework\v2.0.50727\RegA sm.exe ".\Quinoa.dll" /codebase Could this be the source of the problem? Again, I don't think so as my home PC has the add-in installed the same way and it works... Thanks for your help. Cedric. |
#7
|
|||
|
|||
![]()
Hi Ken!
So now, the script given by Dave tells me the object is created. I didn't change anything, except maybe simply restarting my PC. And I didn't dream the las ttime, as I remember that the upper case "NOT" in the message box made me smile. Anyway, I attempted to strike on both side : i modified my code to display a message box before doing anything, and I checked the fusion log. In details: * Though I don't use VSTO, my work is based on a VSTO template. Meaning I have the IDTExtensibility implemented in the connect.designer.vb file, and the connect method in the Connect class. So I tried putting a Msgbox in both the connect method and the previously unchanged OnConnection method. None of them appeared. Strange... * The fusion log is also quite amazing : when I load the COM object using Dave's script, I have the message box telling me the object is loaded, and I can see 4 entries in the fusion log. Now, when I launch Outlook (with load behavior = 3), or when I go to the com mgt dialog and start my add-in, nothing appears in the fusion log, as if there wasn't any attempt to load the COM object. Let me mention that I tool care of logging all binds. My conclusion is that my object is loaded by Dave's script, but for some reason, not by Outlook. And this is why my message boxes don't appear. One way to doublecheck this would be to add a few lines of code to Dave's script to simulate the call made by outlook, I guess by retreiving an existing instance of outlook and calling the OnConnection... but as I'm a very absolute beginner newbie apprentice to VBScript, I don't know how to achieve this. Then I'd like to investigate further on how Outlook can reject a com add-in like that. One difference with my home PC is the Linked in COM add-in which seems to be non-managed (doesn't call mscoee-thingamabob.dll), and is installed on my work PC where my add-in fails. In case it could interfere, i tried to uncheck it in the COM dialog, and then uninstalling it, but none of these actions changed anything. Any help much appreciated! Thanks in advance. Cedric. |
#8
|
|||
|
|||
![]()
Hi Ken!
So now, the script given by Dave tells me the object is created. I didn't change anything, except maybe simply restarting my PC. And I didn't dream the las ttime, as I remember that the upper case "NOT" in the message box made me smile. Anyway, I attempted to strike on both side : i modified my code to display a message box before doing anything, and I checked the fusion log. In details: * Though I don't use VSTO, my work is based on a VSTO template. Meaning I have the IDTExtensibility implemented in the connect.designer.vb file, and the connect method in the Connect class. So I tried putting a Msgbox in both the connect method and the previously unchanged OnConnection method. None of them appeared. Strange... * The fusion log is also quite amazing : when I load the COM object using Dave's script, I have the message box telling me the object is loaded, and I can see 4 entries in the fusion log. Now, when I launch Outlook (with load behavior = 3), or when I go to the com mgt dialog and start my add-in, nothing appears in the fusion log, as if there wasn't any attempt to load the COM object. Let me mention that I tool care of logging all binds. My conclusion is that my object is loaded by Dave's script, but for some reason, not by Outlook. And this is why my message boxes don't appear. One way to doublecheck this would be to add a few lines of code to Dave's script to simulate the call made by outlook, I guess by retreiving an existing instance of outlook and calling the OnConnection... but as I'm a very absolute beginner newbie apprentice to VBScript, I don't know how to achieve this. Then I'd like to investigate further on how Outlook can reject a com add-in like that. One difference with my home PC is the Linked in COM add-in which seems to be non-managed (doesn't call mscoee-thingamabob.dll), and is installed on my work PC where my add-in fails. In case it could interfere, i tried to uncheck it in the COM dialog, and then uninstalling it, but none of these actions changed anything. Any help much appreciated! Thanks in advance. Cedric. |
#9
|
|||
|
|||
![]()
Hi Cedric,
Check to see if your COM Addin is in the disabled items list. In Outlook 2003: Help About Microsoft Outlook Disabled Items In Outlook 2007: Help Disabled Items If it is, or if there are others there enable them. One of the problems with Shared Com Addins is that they all share the same underlying DLL (mscoree.dll) Therefore if someone else's Shared COM Addin gets disabled that could have an affect on yours because they use the same underlying DLL. I have in the past tried to alter my script to call directly into the _IDTExtensibility2 methods to no avail. I always run into type mismatch errrors and I haven't had the persistence to debug why. Dave "Cedric" wrote: Hi Ken! So now, the script given by Dave tells me the object is created. I didn't change anything, except maybe simply restarting my PC. And I didn't dream the las ttime, as I remember that the upper case "NOT" in the message box made me smile. Anyway, I attempted to strike on both side : i modified my code to display a message box before doing anything, and I checked the fusion log. In details: * Though I don't use VSTO, my work is based on a VSTO template. Meaning I have the IDTExtensibility implemented in the connect.designer.vb file, and the connect method in the Connect class. So I tried putting a Msgbox in both the connect method and the previously unchanged OnConnection method. None of them appeared. Strange... * The fusion log is also quite amazing : when I load the COM object using Dave's script, I have the message box telling me the object is loaded, and I can see 4 entries in the fusion log. Now, when I launch Outlook (with load behavior = 3), or when I go to the com mgt dialog and start my add-in, nothing appears in the fusion log, as if there wasn't any attempt to load the COM object. Let me mention that I tool care of logging all binds. My conclusion is that my object is loaded by Dave's script, but for some reason, not by Outlook. And this is why my message boxes don't appear. One way to doublecheck this would be to add a few lines of code to Dave's script to simulate the call made by outlook, I guess by retreiving an existing instance of outlook and calling the OnConnection... but as I'm a very absolute beginner newbie apprentice to VBScript, I don't know how to achieve this. Then I'd like to investigate further on how Outlook can reject a com add-in like that. One difference with my home PC is the Linked in COM add-in which seems to be non-managed (doesn't call mscoee-thingamabob.dll), and is installed on my work PC where my add-in fails. In case it could interfere, i tried to uncheck it in the COM dialog, and then uninstalling it, but none of these actions changed anything. Any help much appreciated! Thanks in advance. Cedric. |
#10
|
|||
|
|||
![]()
To add to what Dave mentioned about disabled addins, one thing you should do
with a shared managed code addin is to provide it with its own AppDomain by shimming the addin. Otherwise any managed code addins that aren't shimmed share the same AppDomain and if one crashes or fires an unhandled exception the chances are that all of them will be disabled by Outlook. Shimming helps to prevent that. There's a COM Shim Wizard that you should download that will provide shimming for a managed code addin. You can download the latest version of the wizard (2.3.1) from http://www.microsoft.com/downloads/d...DisplayLang=en -- 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 "Cedric" wrote in message ... Hi Ken! So now, the script given by Dave tells me the object is created. I didn't change anything, except maybe simply restarting my PC. And I didn't dream the las ttime, as I remember that the upper case "NOT" in the message box made me smile. Anyway, I attempted to strike on both side : i modified my code to display a message box before doing anything, and I checked the fusion log. In details: * Though I don't use VSTO, my work is based on a VSTO template. Meaning I have the IDTExtensibility implemented in the connect.designer.vb file, and the connect method in the Connect class. So I tried putting a Msgbox in both the connect method and the previously unchanged OnConnection method. None of them appeared. Strange... * The fusion log is also quite amazing : when I load the COM object using Dave's script, I have the message box telling me the object is loaded, and I can see 4 entries in the fusion log. Now, when I launch Outlook (with load behavior = 3), or when I go to the com mgt dialog and start my add-in, nothing appears in the fusion log, as if there wasn't any attempt to load the COM object. Let me mention that I tool care of logging all binds. My conclusion is that my object is loaded by Dave's script, but for some reason, not by Outlook. And this is why my message boxes don't appear. One way to doublecheck this would be to add a few lines of code to Dave's script to simulate the call made by outlook, I guess by retreiving an existing instance of outlook and calling the OnConnection... but as I'm a very absolute beginner newbie apprentice to VBScript, I don't know how to achieve this. Then I'd like to investigate further on how Outlook can reject a com add-in like that. One difference with my home PC is the Linked in COM add-in which seems to be non-managed (doesn't call mscoee-thingamabob.dll), and is installed on my work PC where my add-in fails. In case it could interfere, i tried to uncheck it in the COM dialog, and then uninstalling it, but none of these actions changed anything. Any help much appreciated! Thanks in advance. Cedric. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
error notice, sbcyahoo email -- PLEASE HELP! | Kelsey | Outlook - Installation | 1 | June 17th 08 09:27 AM |
fix error message-messaging interface has returned unknown error | ABROWN | Outlook - Calandaring | 0 | January 23rd 08 05:27 PM |
error sku112.cab when installing oulook 07 error message 1311 | Boomer | Outlook - Installation | 0 | June 27th 07 01:34 AM |
OE Error notice | bill | Outlook Express | 2 | January 28th 07 12:40 AM |
How do I add a message to the meeting cancellation notice in Outl. | JC | Outlook - Calandaring | 0 | February 13th 06 04:10 AM |