char* convertCStringToChars(CString string) { int nLength=string.GetLength(); char *c=new char[nLength+1]; memset(c,0,nLength+1); WideCharToMultiByte(CP_ACP,0,string,nLength,c,nLength,NULL,NULL); return c; }
时间: 2024-12-25 05:29:24
char* convertCStringToChars(CString string) { int nLength=string.GetLength(); char *c=new char[nLength+1]; memset(c,0,nLength+1); WideCharToMultiByte(CP_ACP,0,string,nLength,c,nLength,NULL,NULL); return c; }