Huw Davies (@huw) commented about dlls/uiautomationcore/uia_provider.c:
+static BOOL msaa_acc_compare(IAccessible *acc, IAccessible *acc2) +{
- LONG child_count[2], left[2], top[2], width[2], height[2];
- BSTR name[2] = { NULL, NULL };
- BOOL matched = FALSE;
- int match_count = 0;
- VARIANT cid, v, v2;
- HRESULT hr, hr2;
- acc = msaa_acc_da_unwrap(acc);
- acc2 = msaa_acc_da_unwrap(acc2);
- if (acc == acc2)
- {
matched = TRUE;
goto exit;
- }
There's no need to compare the IAccessible ptrs, given that you compare their IUnknowns later.