Mbstowcs () is a simplified version of multibytetowidechar (). In addition to the parameters, I originally thought that the parameters were less, and I didn't affect the use. Today I found a small problem, on the conversion of Chinese characters, the former does not seem to be The Chinese characters are processed, and the conversion is displayed as garbled, and the latter is not. It seems that you can't be too lazy. I started too much, but I'm still in use, but I even want to use A2OLE () macro, but unfortunately this good Dongdong cannot be used in ordinary Win32. Ha ha.
Code:
Wchar strpath [MAX_PATH];
Char buf [] = "I am Chinese";
// Simplified version of the conversion of Chinese characters
// mbstowcs (strpath, buf, max_path);
/ / Still this better
MultibyToWideChar (CP_ACP, 0, BUF, Strlen (Buf), StrPath, Max_Path);