1 CString 转换为 char*
CString str( "lkjkhhgaf ");
int nLenth = str.GetLength ();
char *sz = new char [nLength];
sz = str.GetBuffer ( 0 );
2 char * 转换为 CString
char sz[128];
CString str;
str.Format ( "%s ", sz );
3 string 转换为 char*
string strDataCmd = {"..."};
char* strCmd = (char*)malloc(MAX_CMD_LEN);
memset(strCmd, 0, MAX_CMD_LEN);
sprintf(strCmd,"%s",strDataCmd);