Crash hosting add in content in MDI frame.

May 21, 2008 at 5:59 PM
I am attempting to host WPF content from an AddIn in an MFC MDI application. Every time I bring up a modal dialog from the AddIn (via clicking a button that is hosted in the MDI frame) I crash with the following error: "The activation context being deactivated is not active for the current thread of execution."

I have a very small and simple reproduction if anyone is willing to take a look at it. Just build the App. Run it, and go to help->about. This will bring up the MDI window. Then click the button in the MDI child. Crash! You will only see the error mentioned if you have first chance exceptions on and click through some of them. Otherwise you just get "and external component threw and exception"

Link To Sample Application

May 21, 2008 at 6:57 PM
Additional information: If you host the addin in the same app domain as the MFC app is in it works.
May 21, 2008 at 7:17 PM
Additional information: If you host the addin in the same app domain as the MFC app is in it works.