Hans Leidekker : wbemprox: Both signature parameters are optional in IWbemClassObject::GetMethod.

Alexandre Julliard julliard at winehq.org
Fri Jan 11 13:46:59 CST 2013


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

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Fri Jan 11 17:21:23 2013 +0100

wbemprox: Both signature parameters are optional in IWbemClassObject::GetMethod.

---

 dlls/wbemprox/class.c |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/dlls/wbemprox/class.c b/dlls/wbemprox/class.c
index 994e76b..4e27c5c 100644
--- a/dlls/wbemprox/class.c
+++ b/dlls/wbemprox/class.c
@@ -847,15 +847,23 @@ static HRESULT WINAPI class_object_GetMethod(
     IWbemClassObject **ppOutSignature )
 {
     struct class_object *co = impl_from_IWbemClassObject( iface );
+    IWbemClassObject *in, *out;
     HRESULT hr;
 
     TRACE("%p, %s, %08x, %p, %p\n", iface, debugstr_w(wszName), lFlags, ppInSignature, ppOutSignature);
 
-    hr = create_signature( co->name, wszName, PARAM_IN, ppInSignature );
-    if (hr != S_OK || !ppOutSignature) return hr;
+    hr = create_signature( co->name, wszName, PARAM_IN, &in );
+    if (hr != S_OK) return hr;
 
-    hr = create_signature( co->name, wszName, PARAM_OUT, ppOutSignature );
-    if (hr != S_OK) IWbemClassObject_Release( *ppInSignature );
+    hr = create_signature( co->name, wszName, PARAM_OUT, &out );
+    if (hr == S_OK)
+    {
+        if (ppInSignature) *ppInSignature = in;
+        else IWbemClassObject_Release( in );
+        if (ppOutSignature) *ppOutSignature = out;
+        else IWbemClassObject_Release( out );
+    }
+    else IWbemClassObject_Release( in );
     return hr;
 }
 




More information about the wine-cvs mailing list