11 Sep
2025
11 Sep
'25
3:53 a.m.
On Thu Sep 11 03:53:29 2025 +0000, Rémi Bernon wrote:
```suggestion:-10+0 HRESULT hr; if (FAILED(hr = WindowsCreateString( media_player_name, wcslen( media_player_name ), &str ))) return hr; if (SUCCEEDED(hr = RoActivateInstance( str, &inspectable ))) { hr = IInspectable_QueryInterface( inspectable, &IID_IMediaPlayer, (void **)media_player ); IInspectable_Release( inspectable ); } WindowsDeleteString( str ); return hr; ``` Otherwise you'd call WindowsDeleteString even if WindowsCreateString failed (no big deal but still).
Yeah, that's why I initialized the HSTRING to NULL. Though, this looks better style-wise, thanks. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/8937#note_115639