forked from Mirrors/wine-wine
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
parent
ab355d6ea3
commit
7c16aacc5f
|
@ -265,7 +265,7 @@ static HRESULT WINAPI property_bag_Write(IPropertyBag *iface, const WCHAR *name,
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
WARN("Unhandled type %s.\n", debugstr_vt(V_VT(var)));
|
WARN("Unhandled type %s.\n", debugstr_vt(V_VT(var)));
|
||||||
return E_FAIL;
|
return E_INVALIDARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
RegCloseKey(key);
|
RegCloseKey(key);
|
||||||
|
|
|
@ -377,7 +377,7 @@ static void test_directshow_filter(void)
|
||||||
|
|
||||||
V_VT(&var) = VT_LPWSTR;
|
V_VT(&var) = VT_LPWSTR;
|
||||||
hr = IPropertyBag_Write(prop_bag, L"FriendlyName", &var);
|
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);
|
VariantClear(&var);
|
||||||
|
|
||||||
V_VT(&var) = VT_I4;
|
V_VT(&var) = VT_I4;
|
||||||
|
@ -406,7 +406,7 @@ static void test_directshow_filter(void)
|
||||||
|
|
||||||
V_VT(&var) = VT_UI4;
|
V_VT(&var) = VT_UI4;
|
||||||
hr = IPropertyBag_Write(prop_bag, L"foobar", &var);
|
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_VT(&var) = VT_ARRAY | VT_UI1;
|
||||||
V_ARRAY(&var) = SafeArrayCreate(VT_UI1, 1, &bound);
|
V_ARRAY(&var) = SafeArrayCreate(VT_UI1, 1, &bound);
|
||||||
|
@ -513,7 +513,7 @@ static void test_codec(void)
|
||||||
|
|
||||||
V_VT(&var) = VT_LPWSTR;
|
V_VT(&var) = VT_LPWSTR;
|
||||||
hr = IPropertyBag_Write(prop_bag, L"FriendlyName", &var);
|
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);
|
VariantClear(&var);
|
||||||
V_VT(&var) = VT_EMPTY;
|
V_VT(&var) = VT_EMPTY;
|
||||||
|
@ -559,7 +559,7 @@ static void test_codec(void)
|
||||||
|
|
||||||
V_VT(&var) = VT_UI4;
|
V_VT(&var) = VT_UI4;
|
||||||
hr = IPropertyBag_Write(prop_bag, L"foobar", &var);
|
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_VT(&var) = VT_ARRAY | VT_UI1;
|
||||||
V_ARRAY(&var) = SafeArrayCreate(VT_UI1, 1, &bound);
|
V_ARRAY(&var) = SafeArrayCreate(VT_UI1, 1, &bound);
|
||||||
|
|
Loading…
Reference in New Issue