Forward return value from QueryInterface instead of always returning S_OK.

This commit is contained in:
Sebastian Lackner 2014-09-29 04:57:30 +02:00
parent e9da761795
commit b4642f5151

View File

@ -1,4 +1,4 @@
From 70568da80d69a946df0aaa574d3cf4e9bb416a8d Mon Sep 17 00:00:00 2001
From 84afbeb6db6e8c3025a48d880d960c79e040e287 Mon Sep 17 00:00:00 2001
From: Jactry Zeng <jzeng@codeweavers.com>
Date: Sun, 28 Sep 2014 14:03:15 +0800
Subject: riched20: Add IID_IRichEditOle and IID_ITextDocument support for
@ -6,8 +6,8 @@ Subject: riched20: Add IID_IRichEditOle and IID_ITextDocument support for
---
dlls/riched20/tests/txtsrv.c | 69 ++++++++++++++++++++++++++++++++++++++++++++
dlls/riched20/txtsrv.c | 12 +++++++-
2 files changed, 80 insertions(+), 1 deletion(-)
dlls/riched20/txtsrv.c | 11 ++++++-
2 files changed, 79 insertions(+), 1 deletion(-)
diff --git a/dlls/riched20/tests/txtsrv.c b/dlls/riched20/tests/txtsrv.c
index 3401f8b..c154e2d 100644
@ -104,7 +104,7 @@ index 3401f8b..c154e2d 100644
if (wrapperCodeMem) VirtualFree(wrapperCodeMem, 0, MEM_RELEASE);
}
diff --git a/dlls/riched20/txtsrv.c b/dlls/riched20/txtsrv.c
index 636efff..3283534 100644
index 636efff..bfe2c7c 100644
--- a/dlls/riched20/txtsrv.c
+++ b/dlls/riched20/txtsrv.c
@@ -29,6 +29,7 @@
@ -115,7 +115,7 @@ index 636efff..3283534 100644
#include "imm.h"
#include "textserv.h"
#include "wine/debug.h"
@@ -79,7 +80,16 @@ static HRESULT WINAPI ITextServicesImpl_QueryInterface(IUnknown *iface, REFIID r
@@ -79,7 +80,15 @@ static HRESULT WINAPI ITextServicesImpl_QueryInterface(IUnknown *iface, REFIID r
*ppv = &This->IUnknown_inner;
else if (IsEqualIID(riid, &IID_ITextServices))
*ppv = &This->ITextServices_iface;
@ -125,8 +125,7 @@ index 636efff..3283534 100644
+ if (!This->editor->reOle)
+ if (!CreateIRichEditOle(This->outer_unk, This->editor, (LPVOID *)&(This->editor->reOle)))
+ return E_OUTOFMEMORY;
+ IRichEditOle_QueryInterface(This->editor->reOle, riid, ppv);
+ return S_OK;
+ return IRichEditOle_QueryInterface(This->editor->reOle, riid, ppv);
+ }
+ else
+ {