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