chsvlib
chsv helper source code

◆ GetUniqueStringW()

int Chusov::String::GetUniqueStringW ( wchar_t *  lpStr,
std::size_t  cchStr 
)
noexcept

Generates an UUID as a wide C string and writes it into the output buffer.

Parameters
[out]lpStris a pointer to the buffer holding the string on output. Its size, in wide characters, must not be less then GUID_LENGTH + 1.
cchStris a capacity of the output buffer in wide characters. This value must not be less then GUID_LENGTH + 1 for the buffer to be able to hold the UUID as a string together with the terminating zero character.
Returns
The function returns true on success and false on failure. Use GetLastChsvError to get extended error information.
Remarks
The string is returned in format "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" plus the terminating zero as the last character.
See also
AllocateUniqueStringW;
AllocateUniqueTempFileNameW.