There was an error while loading. Please reload this page.
The wil::details::string_maker is an internal template type which is used to create Unicode strings.
wil::details::string_maker
template<typename string_type> struct string_maker<string_type>;
The string_maker supports any Unicode string type that has a string_allocator:
string_maker
string_allocator
unique_process_heap_string
unique_hlocal_string
unique_hglobal_string
unique_cotaskmem_string
unique_midl_string
It also supports the following string types:
unique_hstring
std::wstring
stl.h
HRESULT make(_In_reads_opt_(length) PCWSTR source, size_t length) noexcept;
Allocates memory for a string that can hold length characters (plus a terminating null).
length
If source is non-null, then the memory is initialized from source.
source
If source is nullptr, then the memory is zero-initialized.
nullptr
It is legal to call make more than once. Doing so frees the previous buffer.
make
wchar_t* buffer();
Returns a pointer to the memory allocated by make. The expectation is that the caller will fill this buffer with data, up to length characters.
string_type release();
Converts the memory allocated by make to a string and returns it. The string_maker is returned to its empty state.
static PCWSTR get(string_type const& value);
Static function to extract a pointer to a null-terminated string buffer from an existing string object.