WindowsDeleteString function (winstring.h)

Decrements the reference count of a string buffer.

Syntax

HRESULT WindowsDeleteString(
  HSTRING string
);

Parameters

string

Type: [in] HSTRING

The string to be deleted. If string is a fast-pass string created by WindowsCreateStringReference, or if string is NULL or empty, no action is taken and S_OK is returned.

Return value

Type: HRESULT

This function always returns S_OK.

Remarks

Use the WindowsDeleteString function to de-allocate an HSTRING. Calling WindowsDeleteString decrements the reference count of the backing buffer, and if the reference count reaches 0, the Windows Runtime de-allocates the buffer.

Requirements

Requirement Value
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

See also

WindowsCreateString

WindowsCreateStringReference