///
typedef basic_string<TCHAR> TSTRING;
typedef vector<TSTRING> VECTSTRING;
// lpszToken like _T(", %"),用它包含的字符拆分字符串,由pvtDest输出结果
BOOL SplitString(LPCTSTR lpszSource, VECTSTRING* pvtDest, LPCTSTR lpszToken)
{
if(NULL == pvtDest)
return FALSE;
TCHAR szSource[MAX_STRING] = {0};
lstrcpy(szSource, lpszSource);
LPTSTR pChar = _tcstok(szSource, lpszToken);
while(NULL != pChar)
{
TSTRING strGot = pChar;
pvtDest->push_back(strGot);
pChar = _tcstok(NULL, lpszToken);
}
BOOL bRet = (pvtDest->size() > 0);
return bRet;
}
///