Export (0) Print
Expand All

HStringReference Class

Represents an HSTRING that is created from an existing string.

class HStringReference;

The lifetime of the backing buffer in the new HSTRING is not managed by the Windows Runtime. The caller allocates a source string on the stack frame to avoid a heap allocation and to eliminate the risk of a memory leak. Also, the caller must ensure that source string remains unchanged during the lifetime of the attached HSTRING. For more information, see WindowsCreateStringReference function.

Name

Description

HStringReference::HStringReference Constructor

Initializes a new instance of the HStringReference class.

Member

Description

HStringReference::CopyTo Method

Copies the current HStringReference object to an HSTRING object.

HStringReference::Get Method

Retrieves the value of the underlying HSTRING handle.

Name

Description

HStringReference::Operator= Operator

Moves the value of another HStringReference object to the current HStringReference object.

HStringReference::Operator== Operator

Indicates whether the two parameters are equal.

HStringReference::Operator!= Operator

Indicates whether the two parameters are not equal.

HStringReference

Header: corewrappers.h

Namespace: Microsoft::WRL::Wrappers

Show:
© 2014 Microsoft