1、获取CString字节数int z_Len = WideCharToMultiByte(CP_ACP, 0, z_FileXml.GetBuffer(), z_FileXml.GetLength(), NULL, 0, NULL, NULL); z_Len+=1;z_XmlChar = new char[z_Len];ZeroMemory(z_XmlChar, z_Len);