- The first overload takes a @c NUL-terminated input string. The second
- one takes a string of exactly the specified length and the string may
- include or not the trailing @c NUL character(s). If the string is not
- @c NUL-terminated, a temporary @c NUL-terminated copy of it suitable
- for passing to wxMBConv::MB2WC is made, so it is more efficient to
- ensure that the string is does have the appropriate number of @c NUL
- bytes (which is usually 1 but may be 2 or 4 for UTF-16 or UTF-32, see
- wxMBConv::GetMBNulLen), especially for long strings.
-
- If @a outLen is not-@NULL, it receives the length of the converted
- string.
+ This function is a convenient wrapper around ToWChar() as it takes care
+ of allocating the buffer of the necessary size itself. Its parameters
+ have the same meaning as for ToWChar(), in particular @a inLen can be
+ specified explicitly in which case exactly that many characters are
+ converted and @a outLen receives (if non-@NULL) exactly the
+ corresponding number of wide characters, whether the last one of them
+ is @c NUL or not. However if @c inLen is @c wxNO_LEN, then @c outLen
+ doesn't count the trailing @c NUL even if it is always present in this
+ case.
+
+ Finally notice that if the conversion fails, the returned buffer is
+ invalid and @a outLen is set to 0 (and not @c wxCONV_FAILED for
+ compatibility concerns).