我是按照你这样来转换的,可是我又遇到另外一个问题就是:
 LPTSTR lpsz = lpRowAB->aRow[0].lpProps[ieidPR_DISPLAY_NAME].Value.lpszA;  
LPTSTR lpszMobilePhone = lpRowAB->aRow[0].lpProps[ieidPR_MOBILE_TELEPHONE_NUMBER].Value.lpszA;
string name =ConvertStr(lpsz); //这个转换不出现问题,
string phoneNumber =ConvertStr(lpszOfficePhone) ;//可是这到这时一直出现内存不能读的错误,但是把工程的字符集为unicode后,按一下方式又不会出这个问题,可是又出现乱码,
  LPTSTR lpsz =(LPTSTR) lpRowAB->aRow[0].lpProps[ieidPR_DISPLAY_NAME].Value.lpszA;  
LPTSTR lpszMobilePhone =(LPTSTR) lpRowAB->aRow[0].lpProps[ieidPR_MOBILE_TELEPHONE_NUMBER].Value.lpszA;
CString name =(CString) lpsz;
CString phoneNumber =(CString) lpszMobilePhone;上面的 ConvertStr 方法为:
string  ConvertStr(LPTSTR value) 

   #ifdef UNICODE
    return std::string(CW2A pszA(value));
    #else
   AfxMessageBox(CString(std::string(value).c_str()));
      return std::string((value));
    #endif
}这是什么原因呢,希望大家帮帮我……