Error in Outlook using File Open other users Folder

Add-in Express™ Support Service
That's what is more important than anything else

Error in Outlook using File Open other users Folder
Outlook Crashes when selecting File Open other users Folder 
Matt Driver


Matt


Posts: 152
Joined: 2004-08-17
Hi

I have just upgraded to Premium Support. Anyway I have an issue when using the Add-in.

I am currently using 2.01709.20813 with Outlook 2003 SP1 (11.6359.6360) on Windows XP SP2.

When installing either the add-in tools demo or my own two projects when you select:

File > Open > Other User;s Folder and the selecting an inbox of a colleage I get an exception:

mscorlib "Exception has been thrown by the target of an invocation"

When in debug mode the error message is coming after the event:

Public Sub BeforeViewSwitch(ByVal newView As Object, ByRef cancel As Boolean) Implements IOlExplorerEvents.BeforeViewSwitch
Marshal.ReleaseComObject(newView)
End Sub


But before the code get to the next event.

Public Sub FolderSwitch() Implements IOlExplorerEvents.FolderSwitch
'It crashed before it gets here.
End Subup at the event:


The debugger generates:

A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll

Additional information: The messaging interface has returned an unknown error. If the problem persists, restart Outlook.


And the call stack when the crash occurs:

> mscorlib.dll!System.RuntimeType.InvokeMember(string name = "Parent", System.Reflection.BindingFlags invokeAttr = 0x101c, System.Reflection.Binder binder = <undefined value>, System.Object target = {System.__ComObject}, System.Object[] args = <undefined value>, System.Reflection.ParameterModifier[] modifiers = <undefined value>, System.Globalization.CultureInfo culture = {System.Globalization.CultureInfo}, string[] namedParameters = <undefined value>) + 0x5e1 bytes



mscorlib.dll!System.Type.InvokeMember(string name = "Parent", System.Reflection.BindingFlags invokeAttr = GetProperty, System.Reflection.Binder binder = <undefined value>, System.Object target = {System.__ComObject}, System.Object[] args = <undefined value>) + 0x29 bytes


addinexpress.mso.dll!AddinExpress.MSO.ADXAddinModule.GetFullFolderName(System.Object :?: folder = {System.__ComObject}) + 0x101 bytes


addinexpress.mso.dll!AddinExpress.MSO.ADXAddinModule.OlExplorerEvents_SinkHelper.DoExplorerFolderSwitch(AddinExpress.MSO.ADXAddinModule.OlExplorerEvents_SinkHelper explorer = {AddinExpress.MSO.ADXAddinModule.OlExplorerEvents_SinkHelper}) + 0x1ee bytes


addinexpress.mso.dll!AddinExpress.MSO.ADXAddinModule.OlExplorerEvents_SinkHelper.AddinExpress.MSO.IExplorerEvents.FolderSwitch() + 0x11 bytes



I would be grateful if you could let me know if I have a problem with my environment or whether the add-in is not handling the IOlExplorerEvents system correctly!

Thanks

Matt
Posted 06 Oct, 2004 08:45:04 Top
Eugene Starostin


Guest


Hello Matt,

Welcome to Premium Support Service.

Can you send us your project?
We are ready for your NDA.
Posted 06 Oct, 2004 08:58:33 Top
Matt Driver


Matt


Posts: 152
Joined: 2004-08-17
Hi

I have sent in the code. There is no need for an NDA as there is no business sensitive information.

Matt
Posted 06 Oct, 2004 09:19:07 Top
Eugene Starostin


Guest


Thanks, Matt. Tomorrow we will let you know about the results.
Posted 06 Oct, 2004 09:32:07 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Matt,

At the moment I am examinig the code you sent me yesterday. I am not ready to tell yet what is the cause of the error. But I suppose you will have to correct one thing in your code: you should remove this string "Marshal.ReleaseComObject(Application)" from the RemoveConnection subrouting in OutlookEvents_SinkHelper class. The point is that ADX uses an OutlookApplication object while Outlook is running and you shouldn't delete it manully.
Posted 07 Oct, 2004 08:35:51 Top
Guest


Guest


Thanks, I have removed the ReleaseCom line.

Matt
Posted 07 Oct, 2004 09:21:04 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
I haven't managed to get the same error but I seem to have found out where it could be. I am sending you a link to the new ADX build. Please test it.
Posted 07 Oct, 2004 10:25:55 Top
Guest


Guest


Hi

That has fixed the exception but now my toolbars do not appear. The addin is installed correctly using the install and it appears Outlook as an COM add-in but the tool bars do not show and I cannot right click on the Outlook Toolbar area and turn them on in. The do flash on very quickly when outlook starts up though.

The Inspector Toolbar is there but no buttons.

I uninstall the my project and the current add-in installer and re-installed you new one and rebuilt.

I have check that the bars are enabled and visible.

Any Ideas

thx for fixing the expception so quickly.

Matt
Posted 07 Oct, 2004 11:14:10 Top
Eugene Starostin


Guest


Matt,

Are you here? :-)

To solve the problem just remove asterisk from the FolderName property. We seem to have added a bug in the last build...
Posted 07 Oct, 2004 11:24:17 Top
Matt Driver


Matt


Posts: 152
Joined: 2004-08-17
Hi

I have tried making the toolbars temporary or permanent and still the same happens.

Matt
Posted 07 Oct, 2004 11:27:39 Top