WindowsGetStringRawBuffer function

Gets the backing buffer for the specified string.

Syntax

PCWSTR WindowsGetStringRawBuffer(
  HSTRING string,
  UINT32  *length
);

Parameters

string

Type: HSTRING

The string for which the backing buffer is to be retrieved.

length

Type: UINT32*

The number of Unicode characters in the backing buffer for string, including embedded null characters, but excluding the terminating null; or 0 if string is NULL.

Return Value

Type: PCWSTR

A pointer to the buffer that provides the backing store for string, or the empty string if string is NULL or the empty string.

Remarks

Use the WindowsGetStringRawBuffer function to obtain a pointer to the backing buffer of an HSTRING.

Do not change the contents of the buffer as all HSTRINGs are required to be immutable.

Requirements

   
Minimum supported client Windows 8 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 [desktop apps | UWP apps]
Target Platform Windows
Header winstring.h