dotnet / dotnet/dotnet-api-docs
IRawElementProviderHwndOverride is documented as implementing IRawElementProviderSimple even though it doesn't
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
See https://github.com/dotnet/winforms/pull/3231#discussion_r427133765
`IRawElementProviderHwndOverride` inherits from `IUnknown` only:
https://github.com/tpn/winsdk-10/blob/9b69fd26ac0c7d0b83d378dba01080e93349c2ed/Include/10.0.10240.0/um/UIAutomationCore.idl#L401-L410
```cpp
//
// IRawElementProviderHwndOverride
//
[object, uuid(1d5df27c-8947-4425-b8d9-79787bb460b8), pointer_default(unique)]
interface IRawElementProviderHwndOverride : IUnknown
{
HRESULT GetOverrideProviderForHwnd(
[in] HWND hwnd,
[out, retval] IRawElementProviderSimple ** pRetVal);
}
```
In https://docs.microsoft.com/en-us/windows/win32/api/uiautomationcore/nn-uiautomationcore-irawelementproviderhwndoverride
> The IRawElementProviderHwndOverride interface inherits from the IUnknown interface. IRawElementProviderHwndOverride also has these types of members:
However, the .NET API docs https://docs.microsoft.com/en-us/dotnet/api/system.windows.automation.provider.irawelementproviderhwndoverride?view=netcore-3.1 say that it implements `IRawElementProviderSimple`.
This may be a bug in the implementation of `IRawElementProviderSimple` in `UIAutomationProvider.dll`.
I don't know if this can be changed because that could be source breaking. However, we should definitely document the fact that the class shouldn't actually inherit from `IRawElementProviderSimple`.
This is especially relevant because the documentation is in conflict between win32 and .NET
Contributor guide
Assessment
This issue has not been assessed yet.