From: Connor McAdams cmcadams@codeweavers.com
Signed-off-by: Connor McAdams cmcadams@codeweavers.com --- dlls/uiautomationcore/tests/uiautomation.c | 17 ++++++++++++++++- dlls/uiautomationcore/uia_com_client.c | 12 ++++++++++-- 2 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/dlls/uiautomationcore/tests/uiautomation.c b/dlls/uiautomationcore/tests/uiautomation.c index c2982174463..b33a09d4f11 100644 --- a/dlls/uiautomationcore/tests/uiautomation.c +++ b/dlls/uiautomationcore/tests/uiautomation.c @@ -10108,10 +10108,11 @@ static const struct uia_com_classes com_classes[] = {
static void test_CUIAutomation(void) { + BOOL has_cui8 = TRUE, tmp_b; IUIAutomation *uia_iface; IUnknown *unk1, *unk2; - BOOL has_cui8 = TRUE; HRESULT hr; + VARIANT v; int i;
CoInitializeEx(NULL, COINIT_MULTITHREADED); @@ -10160,6 +10161,13 @@ static void test_CUIAutomation(void) hr = IUIAutomation_get_ReservedNotSupportedValue(uia_iface, &unk2); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(unk1 == unk2, "unk1 != unk2\n"); + + V_VT(&v) = VT_UNKNOWN; + V_UNKNOWN(&v) = unk1; + hr = IUIAutomation_CheckNotSupported(uia_iface, v, &tmp_b); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(tmp_b == TRUE, "tmp_b != TRUE\n"); + IUnknown_Release(unk1); IUnknown_Release(unk2);
@@ -10169,6 +10177,13 @@ static void test_CUIAutomation(void) hr = IUIAutomation_get_ReservedMixedAttributeValue(uia_iface, &unk2); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(unk1 == unk2, "unk1 != unk2\n"); + + V_VT(&v) = VT_UNKNOWN; + V_UNKNOWN(&v) = unk1; + hr = IUIAutomation_CheckNotSupported(uia_iface, v, &tmp_b); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(tmp_b == FALSE, "tmp_b != FALSE\n"); + IUnknown_Release(unk1); IUnknown_Release(unk2);
diff --git a/dlls/uiautomationcore/uia_com_client.c b/dlls/uiautomationcore/uia_com_client.c index 33a1967e489..f8fdfaa6505 100644 --- a/dlls/uiautomationcore/uia_com_client.c +++ b/dlls/uiautomationcore/uia_com_client.c @@ -1503,8 +1503,16 @@ static HRESULT WINAPI uia_iface_PollForPotentialSupportedProperties(IUIAutomatio
static HRESULT WINAPI uia_iface_CheckNotSupported(IUIAutomation6 *iface, VARIANT in_val, BOOL *match) { - FIXME("%p, %s, %p: stub\n", iface, debugstr_variant(&in_val), match); - return E_NOTIMPL; + IUnknown *unk; + + TRACE("%p, %s, %p\n", iface, debugstr_variant(&in_val), match); + + *match = FALSE; + UiaGetReservedNotSupportedValue(&unk); + if (V_VT(&in_val) == VT_UNKNOWN && (V_UNKNOWN(&in_val) == unk)) + *match = TRUE; + + return S_OK; }
static HRESULT WINAPI uia_iface_get_ReservedNotSupportedValue(IUIAutomation6 *iface, IUnknown **out_unk)