Share via


HString Class

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at HString Class.

Provides support for manipulating HSTRING handles.

Syntax

class HString;  

Remarks

The Windows Runtime provides access to strings through HSTRING handles. The HString class provides convenience functions and operators to simplify using HSTRING handles.

Members

Public Constructors

Name Description
HString::HString Constructor Initializes a new instance of the HString class.
HString::~HString Destructor Destroys the current instance of the HString class.

Members

Name Description
HString::Set Method Sets the value of the current HString object to the specified wide-character string or HString parameter.
HString::Attach Method Associates the specified HString object with the current HString object.
HString::CopyTo Method Copies the current HString object to an HSTRING object.
HString::Detach Method Disassociates the specified HString object from its underlying value.
HString::GetAddressOf Method Retrieves a pointer to the underlying HSTRING handle.
HString::Get Method Retrieves the value of the underlying HSTRING handle.
HString::Release Method Deletes the underlying string value and intializes the current HString object to an empty value.
HString::MakeReference Method Creates an HStringReference object from a specified string parameter.

Public Operators

Name Description
HString::Operator= Operator Moves the value of another HString object to the current HString object.
HString::Operator== Operator Indicates whether the two parameters are equal.
HString::Operator!= Operator Indicates whether the two parameters are not equal.

Inheritance Hierarchy

HString

Requirements

Header: corewrappers.h

Namespace: Microsoft::WRL::Wrappers

See Also

Microsoft::WRL::Wrappers Namespace