+ So to properly use this function you need to write:
+ @code
+ size_t lenConv = conv.MB2WC(NULL, in, 0);
+ if ( lenConv == wxCONV_FAILED )
+ ... handle error ...
+ // allocate 1 more character for the trailing NUL and also pass
+ // the size of the buffer to the function now
+ wchar_t *out = new wchar_t[lenConv + 1];
+ if ( conv.MB2WC(out, in, lenConv + 1) == wxCONV_FAILED )
+ ... handle error ...
+ @endcode
+ For this and other reasons, ToWChar() is strongly recommended as a
+ replacement.
+