On 9/25/21 2:01 AM, Connor McAdams wrote:
- hr = IRawElementProviderSimple_GetPropertyValue(p, UIA_NativeWindowHandlePropertyId, &v);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v));
- ok(V_I4(&v) == (INT)hwnd, "V_I4(&v) = %#x\n", V_I4(&v));
This should use same casting macro that you're using in implementation now.
- hr = IRawElementProviderSimple_GetPropertyValue(p, UIA_ProviderDescriptionPropertyId, &v);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(V_VT(&v) == VT_BSTR, "V_VT(&v) = %d\n", V_VT(&v));
- SysFreeString(V_BSTR(&v));
VariantClear() is more appropriate here.
- /* No patterns are implemented on the HWND provider. */
- for (i = 10000; i < 10034; i++)
- {
IUnknown *unk;
unk = NULL;
hr = IRawElementProviderSimple_GetPatternProvider(p, i, &unk);
ok(hr == S_OK, "Unexpected hr %#x, %d.\n", hr, i);
ok(!unk, "Pattern %d returned %p\n", i, unk);
- }
I'm only curious, does this particular index range has some defined meaning that you need to test all of it?
Note that "unk" check doesn't tell you if pointer was reset by this method.