Nikolay Sivov : msctf: Pass QueryInterface arguments properly to main interface method.

Alexandre Julliard julliard at winehq.org
Mon Nov 18 14:51:39 CST 2013


Module: wine
Branch: master
Commit: 58f06cf9723a82f5c698cbee66e44f79ad6fe19e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=58f06cf9723a82f5c698cbee66e44f79ad6fe19e

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Sun Nov 17 12:22:17 2013 +0400

msctf: Pass QueryInterface arguments properly to main interface method.

---

 dlls/msctf/compartmentmgr.c |    4 ++--
 dlls/msctf/context.c        |   12 ++++++------
 dlls/msctf/documentmgr.c    |    2 +-
 dlls/msctf/inputprocessor.c |    2 +-
 dlls/msctf/threadmgr.c      |   12 ++++++------
 5 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/dlls/msctf/compartmentmgr.c b/dlls/msctf/compartmentmgr.c
index 10a6428..eaf072f 100644
--- a/dlls/msctf/compartmentmgr.c
+++ b/dlls/msctf/compartmentmgr.c
@@ -134,7 +134,7 @@ static HRESULT WINAPI CompartmentMgr_QueryInterface(ITfCompartmentMgr *iface, RE
 {
     CompartmentMgr *This = impl_from_ITfCompartmentMgr(iface);
     if (This->pUnkOuter)
-        return IUnknown_QueryInterface(This->pUnkOuter, iid, *ppvOut);
+        return IUnknown_QueryInterface(This->pUnkOuter, iid, ppvOut);
     else
     {
         *ppvOut = NULL;
@@ -574,7 +574,7 @@ static const ITfCompartmentVtbl CompartmentVtbl =
 static HRESULT WINAPI CompartmentSource_QueryInterface(ITfSource *iface, REFIID iid, LPVOID *ppvOut)
 {
     Compartment *This = impl_from_ITfSource(iface);
-    return ITfCompartment_QueryInterface(&This->ITfCompartment_iface, iid, *ppvOut);
+    return ITfCompartment_QueryInterface(&This->ITfCompartment_iface, iid, ppvOut);
 }
 
 static ULONG WINAPI CompartmentSource_AddRef(ITfSource *iface)
diff --git a/dlls/msctf/context.c b/dlls/msctf/context.c
index 6f96e1a..13898f5 100644
--- a/dlls/msctf/context.c
+++ b/dlls/msctf/context.c
@@ -590,7 +590,7 @@ static const ITfContextVtbl ContextVtbl =
 static HRESULT WINAPI ContextSource_QueryInterface(ITfSource *iface, REFIID iid, LPVOID *ppvOut)
 {
     Context *This = impl_from_ITfSource(iface);
-    return ITfContext_QueryInterface(&This->ITfContext_iface, iid, *ppvOut);
+    return ITfContext_QueryInterface(&This->ITfContext_iface, iid, ppvOut);
 }
 
 static ULONG WINAPI ContextSource_AddRef(ITfSource *iface)
@@ -676,7 +676,7 @@ static const ITfSourceVtbl ContextSourceVtbl =
 static HRESULT WINAPI InsertAtSelection_QueryInterface(ITfInsertAtSelection *iface, REFIID iid, LPVOID *ppvOut)
 {
     Context *This = impl_from_ITfInsertAtSelection(iface);
-    return ITfContext_QueryInterface(&This->ITfContext_iface, iid, *ppvOut);
+    return ITfContext_QueryInterface(&This->ITfContext_iface, iid, ppvOut);
 }
 
 static ULONG WINAPI InsertAtSelection_AddRef(ITfInsertAtSelection *iface)
@@ -751,19 +751,19 @@ static const ITfInsertAtSelectionVtbl InsertAtSelectionVtbl =
 static HRESULT WINAPI SourceSingle_QueryInterface(ITfSourceSingle *iface, REFIID iid, LPVOID *ppvOut)
 {
     Context *This = impl_from_ITfSourceSingle(iface);
-    return Context_QueryInterface((ITfContext *)This, iid, *ppvOut);
+    return ITfContext_QueryInterface(&This->ITfContext_iface, iid, ppvOut);
 }
 
 static ULONG WINAPI SourceSingle_AddRef(ITfSourceSingle *iface)
 {
     Context *This = impl_from_ITfSourceSingle(iface);
-    return Context_AddRef((ITfContext *)This);
+    return ITfContext_AddRef(&This->ITfContext_iface);
 }
 
 static ULONG WINAPI SourceSingle_Release(ITfSourceSingle *iface)
 {
     Context *This = impl_from_ITfSourceSingle(iface);
-    return Context_Release((ITfContext *)This);
+    return ITfContext_Release(&This->ITfContext_iface);
 }
 
 static HRESULT WINAPI SourceSingle_AdviseSingleSink( ITfSourceSingle *iface,
@@ -897,7 +897,7 @@ static HRESULT WINAPI TextStoreACPSink_QueryInterface(ITextStoreACPSink *iface,
 
     if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITextStoreACPSink))
     {
-        *ppvOut = This;
+        *ppvOut = &This->ITextStoreACPSink_iface;
     }
 
     if (*ppvOut)
diff --git a/dlls/msctf/documentmgr.c b/dlls/msctf/documentmgr.c
index f3cc12b..fadbb06 100644
--- a/dlls/msctf/documentmgr.c
+++ b/dlls/msctf/documentmgr.c
@@ -280,7 +280,7 @@ static const ITfDocumentMgrVtbl DocumentMgr_DocumentMgrVtbl =
 static HRESULT WINAPI Source_QueryInterface(ITfSource *iface, REFIID iid, LPVOID *ppvOut)
 {
     DocumentMgr *This = impl_from_ITfSource(iface);
-    return ITfDocumentMgr_QueryInterface(&This->ITfDocumentMgr_iface, iid, *ppvOut);
+    return ITfDocumentMgr_QueryInterface(&This->ITfDocumentMgr_iface, iid, ppvOut);
 }
 
 static ULONG WINAPI Source_AddRef(ITfSource *iface)
diff --git a/dlls/msctf/inputprocessor.c b/dlls/msctf/inputprocessor.c
index 5ef8fe0..ad8a9b8 100644
--- a/dlls/msctf/inputprocessor.c
+++ b/dlls/msctf/inputprocessor.c
@@ -691,7 +691,7 @@ static const ITfInputProcessorProfilesVtbl InputProcessorProfilesVtbl =
 static HRESULT WINAPI IPPSource_QueryInterface(ITfSource *iface, REFIID iid, LPVOID *ppvOut)
 {
     InputProcessorProfiles *This = impl_from_ITfSource(iface);
-    return ITfInputProcessorProfiles_QueryInterface(&This->ITfInputProcessorProfiles_iface, iid, *ppvOut);
+    return ITfInputProcessorProfiles_QueryInterface(&This->ITfInputProcessorProfiles_iface, iid, ppvOut);
 }
 
 static ULONG WINAPI IPPSource_AddRef(ITfSource *iface)
diff --git a/dlls/msctf/threadmgr.c b/dlls/msctf/threadmgr.c
index 1d62ac7..960548c 100644
--- a/dlls/msctf/threadmgr.c
+++ b/dlls/msctf/threadmgr.c
@@ -605,7 +605,7 @@ static const ITfThreadMgrVtbl ThreadMgrVtbl =
 static HRESULT WINAPI Source_QueryInterface(ITfSource *iface, REFIID iid, LPVOID *ppvOut)
 {
     ThreadMgr *This = impl_from_ITfSource(iface);
-    return ITfThreadMgr_QueryInterface(&This->ITfThreadMgr_iface, iid, *ppvOut);
+    return ITfThreadMgr_QueryInterface(&This->ITfThreadMgr_iface, iid, ppvOut);
 }
 
 static ULONG WINAPI Source_AddRef(ITfSource *iface)
@@ -694,7 +694,7 @@ static const ITfSourceVtbl ThreadMgrSourceVtbl =
 static HRESULT WINAPI KeystrokeMgr_QueryInterface(ITfKeystrokeMgr *iface, REFIID iid, LPVOID *ppvOut)
 {
     ThreadMgr *This = impl_from_ITfKeystrokeMgr(iface);
-    return ITfThreadMgr_QueryInterface(&This->ITfThreadMgr_iface, iid, *ppvOut);
+    return ITfThreadMgr_QueryInterface(&This->ITfThreadMgr_iface, iid, ppvOut);
 }
 
 static ULONG WINAPI KeystrokeMgr_AddRef(ITfKeystrokeMgr *iface)
@@ -986,7 +986,7 @@ static const ITfKeystrokeMgrVtbl KeystrokeMgrVtbl =
 static HRESULT WINAPI MessagePump_QueryInterface(ITfMessagePump *iface, REFIID iid, LPVOID *ppvOut)
 {
     ThreadMgr *This = impl_from_ITfMessagePump(iface);
-    return ITfThreadMgr_QueryInterface(&This->ITfThreadMgr_iface, iid, *ppvOut);
+    return ITfThreadMgr_QueryInterface(&This->ITfThreadMgr_iface, iid, ppvOut);
 }
 
 static ULONG WINAPI MessagePump_AddRef(ITfMessagePump *iface)
@@ -1059,7 +1059,7 @@ static const ITfMessagePumpVtbl MessagePumpVtbl =
 static HRESULT WINAPI ClientId_QueryInterface(ITfClientId *iface, REFIID iid, LPVOID *ppvOut)
 {
     ThreadMgr *This = impl_from_ITfClientId(iface);
-    return ITfThreadMgr_QueryInterface(&This->ITfThreadMgr_iface, iid, *ppvOut);
+    return ITfThreadMgr_QueryInterface(&This->ITfThreadMgr_iface, iid, ppvOut);
 }
 
 static ULONG WINAPI ClientId_AddRef(ITfClientId *iface)
@@ -1105,7 +1105,7 @@ static const ITfClientIdVtbl ClientIdVtbl =
 static HRESULT WINAPI ThreadMgrEventSink_QueryInterface(ITfThreadMgrEventSink *iface, REFIID iid, LPVOID *ppvOut)
 {
     ThreadMgr *This = impl_from_ITfThreadMgrEventSink(iface);
-    return ITfThreadMgr_QueryInterface(&This->ITfThreadMgr_iface, iid, *ppvOut);
+    return ITfThreadMgr_QueryInterface(&This->ITfThreadMgr_iface, iid, ppvOut);
 }
 
 static ULONG WINAPI ThreadMgrEventSink_AddRef(ITfThreadMgrEventSink *iface)
@@ -1225,7 +1225,7 @@ static const ITfThreadMgrEventSinkVtbl ThreadMgrEventSinkVtbl =
 static HRESULT WINAPI ThreadMgrSourceSingle_QueryInterface(ITfSourceSingle *iface, REFIID iid, LPVOID *ppvOut)
 {
     ThreadMgr *This = impl_from_ITfSourceSingle(iface);
-    return ITfThreadMgr_QueryInterface(&This->ITfThreadMgr_iface, iid, *ppvOut);
+    return ITfThreadMgr_QueryInterface(&This->ITfThreadMgr_iface, iid, ppvOut);
 }
 
 static ULONG WINAPI ThreadMgrSourceSingle_AddRef(ITfSourceSingle *iface)




More information about the wine-cvs mailing list