Allocates and returns a multibyte version of a wide string.
- Parameters
-
[in] | pszRight | is a pointer to an input wide string. The string need not to be zero-terminated if cchRight specifies its actual size in wide characters. On the contrary cchRight can be (size_t) -1, in which case pszRight must be zero-terminated. If a zero-terminator is found among first cchRight wide characters of the input string the conversion stops and the last part of the input string is ignored. The terminator is converted and written to the output buffer returned by the function. |
[in] | cchRight | may explicitly specify a length of the input wide string in characters. Or it can be (size_t) -1 in which case the length of the input must be given by the zero-terminating character. |
- Returns
- The function returns an allocated buffer containing the converted zero-terminated multibyte string. If an error occurs the function returns NULL and sets corresponding chsvlib error code. The allocated string should be deallocated by FreeStringA function or by any other freeing function defined in chsvmem.h.
- See also
- FreeStringA;
AllocateAndFormatStringA;
AllocateWideFromMBS;
ConvertMBSToWide.