- cchWideChar
- [in] Size, in WCHAR values, of the string indicated by lpWideCharStr . If this parameter is set to -1, the function assumes the string to be null-terminated and calculates the length automatically, including the null terminator. If cchWideChar is set to 0, the function fails.
- 该参数如果为-1,则计算带有结束符的字符串预计长度,为正整数,则计算不带结束符的字符串预算长度.为0表示失败.
- 在转换时,需要考虑到计算的方式,并按照正确的方式添加目标缓存区.