Esme Povirk (@madewokherd) commented about dlls/uiautomationcore/uia_provider.c:
V_I4(ret_val) = HandleToUlong(base_hwnd_prov->hwnd); break;
- case UIA_ProcessIdPropertyId:
- {
DWORD pid;
SetLastError(NOERROR);
Technically, NOERROR is an HRESULT, NO_ERROR is Win32 error.
This also doesn't make much sense to me. AFAICT GetWindowThreadProcessId in Wine should always set an error if it fails, and if it doesn't I'm not sure S_OK is an improvement.