none
Call to AfxInitRichEdit2 in COM Addin causes Outlook windows to crash RRS feed

  • Question

  • Hello,

    I have a weird problem in my C++ COM Addin and Outlook. Recently I have noticed that some of Outlook dialogs show warning message stating "Out of memory or system resources..." (or very similar and it tells me to close some of Outlook windows).

    The problem is gone when I disable my Addin. I did some debugging and it shows that once I call AfxInitRichEdit2 in my window that pops during Outlook startup (it is Non-modal dialog) all these problems are showing. 

    Another thing. My window contain a RichEdit20a control. Not every Outlook window show this problem only ones that also contain RichEdit20(W/A) control.

    In example this window contain rich edit control (red line), and this window doesn't shows up if mentioned function is called by my addin.


    There are to fixes to this problem:

    1. Install Microsoft KB 2533623

    2. Change the AfxInitRichEdit2 function to AfxInitRichEdit

    Can anyone tell me why and how calling mentioned function affects Outlook? What is the reason of this kind of behavior? 


    Wednesday, April 17, 2013 9:53 AM

Answers

  • Are you using the Office RichEdit or the system version one? I suspect the call that you're making is loading a version of RichEdit that Outlook just can’t work with - I agree with Dmitry. In this scenario, i would get the Procmon traces and analyze the below to see the different versions of RichEdit that get loaded :

    1 – When they’re not involved
    2 – When you call AfxInitRichEdit2
    3 – When you install the HF and call AfxInitRichEdit1

    DeVa, M.S., {MSFT} Please remember to mark the replies as answers if they help

    Tuesday, April 30, 2013 6:27 PM

All replies

  • I don't think anybody but MS support can answer that. An since you have a workaround, I doubt they will change anything.

    As a wild guess, I would imagine AfxInitRichEdit2 registers the window class incompatible with what Outlook expects when it later attempts to register or use RichEdit20.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.4 is now available!

    Wednesday, April 17, 2013 2:57 PM
  • Are you using the Office RichEdit or the system version one? I suspect the call that you're making is loading a version of RichEdit that Outlook just can’t work with - I agree with Dmitry. In this scenario, i would get the Procmon traces and analyze the below to see the different versions of RichEdit that get loaded :

    1 – When they’re not involved
    2 – When you call AfxInitRichEdit2
    3 – When you install the HF and call AfxInitRichEdit1

    DeVa, M.S., {MSFT} Please remember to mark the replies as answers if they help

    Tuesday, April 30, 2013 6:27 PM