Pointer to interer to hold the number of UTF-16 characters needed to store the encoded result, if the buffer provided was too small.
source
UTF-8 text to convert
Returns
Number of characters in the conversion output, excluding the terminating null.
Description
Convert UTF-8 to Unicode (UTF-16)
Remarks
If the buffer provided in dest is insufficient to store the conversion result, the required buffer size will be provided in cchNeeded.
If the buffer provided was large enough to store the result, cchNeeded will not be changed.
To use this API efficiently, callers should initialize cchNeeded to zero, provide an output buffer that is large enough to handle the most common cases, and then check cchNeeded after the conversion is done to determine whether a larger buffer is needed. This avoids the need to call the API twice in the most common cases.