On Tue Feb 21 13:31:03 2023 +0000, Nikolay Sivov wrote:
I seems safer not to assume return type, and always to VariantClear() just in case. Because of what UiaGetReservedNotSupportedValue() returns for example.
All property values returned from providers are [type checked](https://gitlab.winehq.org/wine/wine/-/blob/master/dlls/uiautomationcore/uia_...), so the only possible return values for a specific property are either the correct type, or `VT_UNKNOWN` which would be the `UiaGetReservedNotSupportedValue()` interface you're referring to. That interface is static, (aside from the `IMarshal` interface, which shouldn't be getting passed here), so releasing it essentially does nothing.
I guess we could clear it just in case that changes in the future for some reason, it wouldn't harm anything.