PC Review


Reply
Thread Tools Rate Thread

Outlook 2007 Addin hangs if Business Contact Manager is installed

 
 
M_Dill
Guest
Posts: n/a
 
      29th Jul 2008
Hi folks,
We are developing an addin for Outlook 2007. The addin works perfectly if
Business Contact Manager is NOT installed. But if Business Contact Manager IS
installed, Outlook locks up whenever we try to do any contact-related
operations.

Example-
One of the features of our addin is creating a new contact from a phone
number. Our code basically does this:

ContactItem contact = app.CreateItem(OlItemType.olContactItem) as ContactItem;
contact.FullName = "Bob Smith";
contact.PrimaryTelephoneNumber = "555-5555";
contact.Save();
contact.Display(false);

This does exactly what you would expect - creates a contact named Bob Smith,
gives it a phone number of 555-555, saves it, and then displays it. The
problem happens as soon as you close the contact window. Outlook simply
hangs, and stops responding to user input. Breaking into the debugger shows
that it's not hanging in our code. Here is the call stack from the hang:

[In a sleep, wait, or join]
Microsoft.Interop.Mapi.Impl.dll!Microsoft.Interop.Mapi.GCHelper.CollectAndWaitIfNeeded() + 0x6b bytes
BCMRes.dll!Microsoft.BusinessSolutions.eCRM.Resources.MainThreadHelper.InvokerForm.WndProc(ref System.Windows.Forms.Message m) + 0x5d bytes
System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.OnMessage(ref System.Windows.Forms.Message m) + 0xd bytes
System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.WndProc(ref System.Windows.Forms.Message m) + 0x36 bytes
System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr
hWnd, int msg = 49796, System.IntPtr wparam, System.IntPtr lparam) + 0x57
bytes
[Appdomain Transition]
[Native to Managed Transition]

Any thoughts? Are we doing something wrong? Is this a bug in Business
Contact Manager?

Thanks,
Martin Dill


 
Reply With Quote
 
 
 
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      29th Jul 2008
I don't know that there's very much BCM knowledge here. You might be better
off posting in a BCM group. Most of us here have played with BCM and
disabled it or uninstalled it a long time ago.

The alternative is to open a case with MS as to what you're seeing. Just
creating a contact and saving and displaying it should not hang Outlook in a
BCM thread, unless they;re breaking the rules and calling the OOM on a
background or other thread and not marshaling the call to their main thread,
which is a known way to get Outlook to hang very nicely.

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


"M_Dill" <(E-Mail Removed)> wrote in message
news:7704157B-950E-4663-8395-(E-Mail Removed)...
> Hi folks,
> We are developing an addin for Outlook 2007. The addin works perfectly if
> Business Contact Manager is NOT installed. But if Business Contact Manager
> IS
> installed, Outlook locks up whenever we try to do any contact-related
> operations.
>
> Example-
> One of the features of our addin is creating a new contact from a phone
> number. Our code basically does this:
>
> ContactItem contact = app.CreateItem(OlItemType.olContactItem) as
> ContactItem;
> contact.FullName = "Bob Smith";
> contact.PrimaryTelephoneNumber = "555-5555";
> contact.Save();
> contact.Display(false);
>
> This does exactly what you would expect - creates a contact named Bob
> Smith,
> gives it a phone number of 555-555, saves it, and then displays it. The
> problem happens as soon as you close the contact window. Outlook simply
> hangs, and stops responding to user input. Breaking into the debugger
> shows
> that it's not hanging in our code. Here is the call stack from the hang:
>
> [In a sleep, wait, or join]
> Microsoft.Interop.Mapi.Impl.dll!Microsoft.Interop.Mapi.GCHelper.CollectAndWaitIfNeeded()
> + 0x6b bytes
> BCMRes.dll!Microsoft.BusinessSolutions.eCRM.Resources.MainThreadHelper.InvokerForm.WndProc(ref
> System.Windows.Forms.Message m) + 0x5d bytes
> System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.OnMessage(ref
> System.Windows.Forms.Message m) + 0xd bytes
> System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.WndProc(ref
> System.Windows.Forms.Message m) + 0x36 bytes
> System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr
> hWnd, int msg = 49796, System.IntPtr wparam, System.IntPtr lparam) + 0x57
> bytes
> [Appdomain Transition]
> [Native to Managed Transition]
>
> Any thoughts? Are we doing something wrong? Is this a bug in Business
> Contact Manager?
>
> Thanks,
> Martin Dill
>
>


 
Reply With Quote
 
M_Dill
Guest
Posts: n/a
 
      30th Jul 2008
Hi Ken, thanks for the reply. I will try posting in a BCM group.

Cheers,
Martin

"Ken Slovak - [MVP - Outlook]" wrote:

> I don't know that there's very much BCM knowledge here. You might be better
> off posting in a BCM group. Most of us here have played with BCM and
> disabled it or uninstalled it a long time ago.
>
> The alternative is to open a case with MS as to what you're seeing. Just
> creating a contact and saving and displaying it should not hang Outlook in a
> BCM thread, unless they;re breaking the rules and calling the OOM on a
> background or other thread and not marshaling the call to their main thread,
> which is a known way to get Outlook to hang very nicely.
>
> --
> 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
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook 2007 Addin hangs if Business Contact Manager is installed M_Dill Microsoft Outlook BCM 0 31st Jul 2008 06:59 PM
Outlook 2007 - Business Contact Manager - Create contact from exis =?Utf-8?B?YWx1bWludW1wb3Jr?= Microsoft Outlook Discussion 0 20th Feb 2007 06:34 PM
Outlook 2007 or 2003 with Business Contact Manager (Beta) Add-in:Business Contacts for Pocket PC Jerry Rasmussen Microsoft Outlook BCM 2 6th Dec 2006 06:50 PM
outlook hangs or freezes when using business contact manager =?Utf-8?B?MVNUIENob2ljZQ==?= Microsoft Outlook BCM 0 14th Feb 2005 01:45 PM
How to get Business Contact Manager addin? Brad Microsoft Outlook Discussion 3 15th Dec 2003 02:55 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:00 PM.