devenum: Return E_INVALIDARG from IPropertyBag::Write() for invalid variant types.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
feature/deterministic
Zebediah Figura 2020-04-14 22:22:48 -05:00 committed by Alexandre Julliard
parent ab355d6ea3
commit 7c16aacc5f
2 changed files with 5 additions and 5 deletions

View File

@ -265,7 +265,7 @@ static HRESULT WINAPI property_bag_Write(IPropertyBag *iface, const WCHAR *name,
}
default:
WARN("Unhandled type %s.\n", debugstr_vt(V_VT(var)));
return E_FAIL;
return E_INVALIDARG;
}
RegCloseKey(key);

View File

@ -377,7 +377,7 @@ static void test_directshow_filter(void)
V_VT(&var) = VT_LPWSTR;
hr = IPropertyBag_Write(prop_bag, L"FriendlyName", &var);
todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
VariantClear(&var);
V_VT(&var) = VT_I4;
@ -406,7 +406,7 @@ static void test_directshow_filter(void)
V_VT(&var) = VT_UI4;
hr = IPropertyBag_Write(prop_bag, L"foobar", &var);
todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
V_VT(&var) = VT_ARRAY | VT_UI1;
V_ARRAY(&var) = SafeArrayCreate(VT_UI1, 1, &bound);
@ -513,7 +513,7 @@ static void test_codec(void)
V_VT(&var) = VT_LPWSTR;
hr = IPropertyBag_Write(prop_bag, L"FriendlyName", &var);
todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
VariantClear(&var);
V_VT(&var) = VT_EMPTY;
@ -559,7 +559,7 @@ static void test_codec(void)
V_VT(&var) = VT_UI4;
hr = IPropertyBag_Write(prop_bag, L"foobar", &var);
todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
V_VT(&var) = VT_ARRAY | VT_UI1;
V_ARRAY(&var) = SafeArrayCreate(VT_UI1, 1, &bound);