//字符串中可包含中文
char* CStringToChar(CString cstr)
{
DWORD dwNum = WideCharToMultiByte(CP_OEMCP, NULL, cstr, -1, NULL, 0, NULL, FALSE);
char* CurrentPath = new char[dwNum];
memset(CurrentPath, 0, sizeof(CurrentPath));
WideCharToMultiByte(CP_OEMCP, NULL, cstr, -1, CurrentPath, dwNum, NULL, FALSE);
return CurrentPath;
}
WChar to Char
最新推荐文章于 2022-09-01 09:45:12 发布