On Sat Jul 8 06:37:56 2023 +0000, Mohamad Al-Jaf wrote:
That makes sense, it indeed duplicates the string on Windows based on the test I added. I'm not sure but there might be an issue with the way Wine handles HSTRING duplication as it's failing to create the right HSTRING. https://testbot.winehq.org/JobDetails.pl?Key=134593 All I did was change it to `WindowsDuplicateString( name, &impl->rawname );` and add `WindowsDeleteString( impl->rawname );` under `IHostName::Release()`.
You should only call `WindowsDeleteString` if the refcount gets to 0 (and then you should also free the hostname, which I also missed).