From 30b6f9acd68f5c45971fabfd37458ce4840e70d3 Mon Sep 17 00:00:00 2001 From: Rob Shearman Date: Wed, 7 Feb 2007 19:30:07 +0000 Subject: [PATCH] oleaut32: Fix the return value of ITypeInfo::Invoke when the property-put named argument isn't DISPID_PROPERTYPUT. --- dlls/oleaut32/tests/tmarshal.c | 5 +---- dlls/oleaut32/typelib.c | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/dlls/oleaut32/tests/tmarshal.c b/dlls/oleaut32/tests/tmarshal.c index 996c2da8152..2393a93f9ac 100644 --- a/dlls/oleaut32/tests/tmarshal.c +++ b/dlls/oleaut32/tests/tmarshal.c @@ -975,10 +975,7 @@ static void test_typelibmarshal(void) dispparams.rgvarg = vararg; VariantInit(&varresult); hr = IDispatch_Invoke(pDispatch, DISPID_TM_NAME, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYPUT, &dispparams, &varresult, &excepinfo, NULL); - todo_wine - { - ok(hr == DISP_E_PARAMNOTFOUND, "IDispatch_Invoke should have returned DISP_E_PARAMNOTFOUND instead of 0x%08x\n", hr); - } + ok(hr == DISP_E_PARAMNOTFOUND, "IDispatch_Invoke should have returned DISP_E_PARAMNOTFOUND instead of 0x%08x\n", hr); VariantClear(&varresult); /* tests param type that cannot be coerced */ diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 50ddd2f512d..d75e7bc4b00 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -5481,7 +5481,7 @@ static HRESULT WINAPI ITypeInfo_fnInvoke( if (!cNamedArgs || (rgdispidNamedArgs[0] != DISPID_PROPERTYPUT)) { ERR("first named arg for property put invocation must be DISPID_PROPERTYPUT\n"); - hres = DISP_E_PARAMNOTOPTIONAL; + hres = DISP_E_PARAMNOTFOUND; goto func_fail; } /* ignore the DISPID_PROPERTYPUT named argument from now on */