July 9, 2017
10:42 a.m.
Hi, I was about to implement this function too, but it seems you've beaten me by two days :-) . Am 2017-07-08 um 17:55 schrieb Mikhail Paulyshka: > + WCHAR longstr[MAX_PATH + 3]; > + memset(longstr, 'A', sizeof(longstr)); This memset doesn't do what you probably expect. It doesn't fill the string with 'A's, but instead with U+4141 characters (䅁, http://www.fileformat.info/info/unicode/char/4141/index.htm). > + if (!src || !dst) > + return 0; This is redundant. WideCharToMultiByte checks this for you and returns 0. I noticed this after sending the _To_wide patch and will send a patch removing the redundant check from _To_wide.