AcDbText* pText = AcDbText::cast(pEnt);
AcString sText = DBHelper::AcStringFree(pText->textString());//pText->textString()为CAD上获取的字符
ACHAR *strtochar = DBHelper::ACHARAcString(sText);
int iSize;
char* pszMultiByte;
//返回接受字符串所需缓冲区的大小,已经包含字符结尾符' '
iSize = WideCharToMultiByte(CP_ACP, 0, strtochar, -1, NULL, 0, NULL, NULL); //iSize =wcslen(pwsUnicode)+1=6
pszMultiByte = (char*)malloc(iSize * sizeof(char)); //不需要 pszMultiByte = (char*)malloc(iSize*sizeof(char)+1);
WideCharToMultiByte(CP_ACP, 0, strtochar, -1, pszMultiByte, iSize, NULL, NULL);
string RespondText = CUsingBaiDuAPI::Usingbaiduapi((const char*)pszMultiByte,true);