25 Jun
2014
25 Jun
'14
3:24 a.m.
On Wed, Jun 25, 2014 at 01:59:42PM +0800, Jactry Zeng wrote:
@@ -1502,6 +1503,13 @@ LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *ppObj) { IRichEditOleImpl *reo;
+ if (editor->reOle) + { + reo = editor->reOle; + reo->ref++; + *ppObj = reo; + return 1; + } reo = heap_alloc(sizeof(IRichEditOleImpl)); if (!reo) return 0;
This is not the way to do this. You want to be calling AddRef on the interface. You probably want to do the if(editor->reOle) check in the EM_GETOLEINTERFACE handler and only call this constructor when needed. Huw.