Commit 646d4407 authored by Connor McAdams's avatar Connor McAdams Committed by Alexandre Julliard

uiautomationcore: Implement UIA_ProcessIdPropertyId for default HWND provider.

parent 8070e44f
...@@ -12357,9 +12357,8 @@ static void test_node_hwnd_provider_(HUIANODE node, HWND hwnd, const char *file, ...@@ -12357,9 +12357,8 @@ static void test_node_hwnd_provider_(HUIANODE node, HWND hwnd, const char *file,
winetest_push_context("UIA_ProcessIdPropertyId"); winetest_push_context("UIA_ProcessIdPropertyId");
hr = UiaGetPropertyValue(node, UIA_ProcessIdPropertyId, &v); hr = UiaGetPropertyValue(node, UIA_ProcessIdPropertyId, &v);
ok_(file, line)(hr == S_OK, "Unexpected hr %#lx\n", hr); ok_(file, line)(hr == S_OK, "Unexpected hr %#lx\n", hr);
todo_wine ok_(file, line)(V_VT(&v) == VT_I4, "Unexpected VT %d\n", V_VT(&v)); ok_(file, line)(V_VT(&v) == VT_I4, "Unexpected VT %d\n", V_VT(&v));
if (V_VT(&v) == VT_I4) ok_(file, line)(V_I4(&v) == pid, "V_I4(&v) = %#lx, expected %#lx\n", V_I4(&v), pid);
ok_(file, line)(V_I4(&v) == pid, "V_I4(&v) = %#lx, expected %#lx\n", V_I4(&v), pid);
VariantClear(&v); VariantClear(&v);
winetest_pop_context(); winetest_pop_context();
} }
......
...@@ -1292,6 +1292,18 @@ static HRESULT WINAPI base_hwnd_provider_GetPropertyValue(IRawElementProviderSim ...@@ -1292,6 +1292,18 @@ static HRESULT WINAPI base_hwnd_provider_GetPropertyValue(IRawElementProviderSim
V_I4(ret_val) = HandleToUlong(base_hwnd_prov->hwnd); V_I4(ret_val) = HandleToUlong(base_hwnd_prov->hwnd);
break; break;
case UIA_ProcessIdPropertyId:
{
DWORD pid;
if (!GetWindowThreadProcessId(base_hwnd_prov->hwnd, &pid))
return UIA_E_ELEMENTNOTAVAILABLE;
V_VT(ret_val) = VT_I4;
V_I4(ret_val) = pid;
break;
}
default: default:
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment