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

This commit is contained in:
Hans Leidekker 2013-01-11 17:21:23 +01:00 committed by Alexandre Julliard
parent 0f64ffd91f
commit f7bf3876af
1 changed files with 12 additions and 4 deletions

View File

@ -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;
}