|
1 | 1 | --- |
2 | 2 | title: "HString Class" |
3 | | -ms.date: "09/24/2018" |
| 3 | +ms.date: "07/15/2019" |
4 | 4 | ms.topic: "reference" |
5 | | -f1_keywords: ["corewrappers/Microsoft::WRL::Wrappers::HString", "corewrappers/Microsoft::WRL::Wrappers::HString::Attach", "corewrappers/Microsoft::WRL::Wrappers::HString::CopyTo", "corewrappers/Microsoft::WRL::Wrappers::HString::Detach", "corewrappers/Microsoft::WRL::Wrappers::HString::Get", "corewrappers/Microsoft::WRL::Wrappers::HString::GetAddressOf", "corewrappers/Microsoft::WRL::Wrappers::HString::HString", "corewrappers/Microsoft::WRL::Wrappers::HString::IsValid", "corewrappers/Microsoft::WRL::Wrappers::HString::MakeReference", "corewrappers/Microsoft::WRL::Wrappers::HString::operator=", "corewrappers/Microsoft::WRL::Wrappers::HString::operator==", "corewrappers/Microsoft::WRL::Wrappers::HString::operator!=", "corewrappers/Microsoft::WRL::Wrappers::HString::operator<", "corewrappers/Microsoft::WRL::Wrappers::HString::Release", "corewrappers/Microsoft::WRL::Wrappers::HString::Set", "corewrappers/Microsoft::WRL::Wrappers::HString::~HString"] |
| 5 | +f1_keywords: ["corewrappers/Microsoft::WRL::Wrappers::HString", "corewrappers/Microsoft::WRL::Wrappers::HString::Attach", "corewrappers/Microsoft::WRL::Wrappers::HString::CopyTo", "corewrappers/Microsoft::WRL::Wrappers::HString::Detach", "corewrappers/Microsoft::WRL::Wrappers::HString::Get", "corewrappers/Microsoft::WRL::Wrappers::HString::GetRawBuffer","corewrappers/Microsoft::WRL::Wrappers::HString::GetAddressOf", "corewrappers/Microsoft::WRL::Wrappers::HString::HString", "corewrappers/Microsoft::WRL::Wrappers::HString::IsValid", "corewrappers/Microsoft::WRL::Wrappers::HString::MakeReference", "corewrappers/Microsoft::WRL::Wrappers::HString::operator=", "corewrappers/Microsoft::WRL::Wrappers::HString::operator==", "corewrappers/Microsoft::WRL::Wrappers::HString::operator!=", "corewrappers/Microsoft::WRL::Wrappers::HString::operator<", "corewrappers/Microsoft::WRL::Wrappers::HString::Release", "corewrappers/Microsoft::WRL::Wrappers::HString::Set", "corewrappers/Microsoft::WRL::Wrappers::HString::~HString"] |
6 | 6 | helpviewer_keywords: ["Microsoft::WRL::Wrappers::HString class", "Microsoft::WRL::Wrappers::HString::Attach method", "Microsoft::WRL::Wrappers::HString::CopyTo method", "Microsoft::WRL::Wrappers::HString::Detach method", "Microsoft::WRL::Wrappers::HString::Get method", "Microsoft::WRL::Wrappers::HString::GetAddressOf method", "Microsoft::WRL::Wrappers::HString::HString, constructor", "Microsoft::WRL::Wrappers::HString::IsValid method", "Microsoft::WRL::Wrappers::HString::MakeReference method", "Microsoft::WRL::Wrappers::HString::operator= operator", "Microsoft::WRL::Wrappers::HString::operator== operator", "Microsoft::WRL::Wrappers::HString::operator!= operator", "Microsoft::WRL::Wrappers::HString::operator< operator", "Microsoft::WRL::Wrappers::HString::Release method", "Microsoft::WRL::Wrappers::HString::Set method", "Microsoft::WRL::Wrappers::HString::~HString, destructor"] |
7 | 7 | ms.assetid: 6709dd2e-8d72-4675-8ec7-1baa7d71854d |
8 | 8 | --- |
@@ -38,6 +38,7 @@ Name | Description |
38 | 38 | [HString::Detach](#detach) | Disassociates the specified `HString` object from its underlying value. |
39 | 39 | [HString::Get](#get) | Retrieves the value of the underlying HSTRING handle. |
40 | 40 | [HString::GetAddressOf](#getaddressof) | Retrieves a pointer to the underlying HSTRING handle. |
| 41 | +[HString::GetRawBuffer](#getrawbuffer) | Retrieves a pointer to the underlying string data. |
41 | 42 | [HString::IsValid](#isvalid) | Indicates whether the current `HString` object is valid. |
42 | 43 | [HString::MakeReference](#makereference) | Creates an `HStringReference` object from a specified string parameter. |
43 | 44 | [HString::Release](#release) | Deletes the underlying string value and intializes the current `HString` object to an empty value. |
@@ -144,6 +145,23 @@ A pointer to the underlying HSTRING handle. |
144 | 145 |
|
145 | 146 | After this operation, the string value of the underlying HSTRING handle is destroyed. |
146 | 147 |
|
| 148 | +## <a name="getrawbuffer"></a>HString::GetRawBuffer |
| 149 | + |
| 150 | +Retrieves a pointer to the underlying string data. |
| 151 | + |
| 152 | +```cpp |
| 153 | +const wchar_t* GetRawBuffer(unsigned int* length) const; |
| 154 | +``` |
| 155 | +### Parameters |
| 156 | +
|
| 157 | +*length* |
| 158 | +Pointer to an **int** variable that receives the length of the data. |
| 159 | +
|
| 160 | +### Return Value |
| 161 | +
|
| 162 | +A **const** pointer to the underlying string data. |
| 163 | +
|
| 164 | +
|
147 | 165 | ## <a name="hstring"></a>HString::HString |
148 | 166 |
|
149 | 167 | Initializes a new instance of the `HString` class. |
|
0 commit comments