[PATCH 15/15] api-ms-win-core-winrt-string: Implement a few HSTRING functions.

Martin Storsjö martin at martin.st
Sat Dec 6 10:48:04 CST 2014


On Sat, 6 Dec 2014, Sebastian Lackner wrote:

> Hi Martin,
>
> please note that besides functions like WindowsSubstring which implicitly manipulate the string buffer, there are also some functions for explicit string buffer management:
>
> WindowsPreallocateStringBuffer - allocate a new string buffer with refcount 1
> WindowsPromoteStringBuffer - create a new string based on an existing string buffer without incrementing refcount
> WindowsDeleteStringBuffer - decrement the refcount of a string buffer

Yep, I saw these as well. Although the MSDN page for 
WindowsDeleteStringBuffer doesn't talk about refcounts anywhere I can see.

Is the only way of using these string buffers to allocate a certain size, 
modify the WCHAR* that WindowsPreallocateStringBuffer returned, or are 
there any other functions involved with these as well?

// Martin



More information about the wine-devel mailing list