///
typedef basic_string TSTRING; typedef vector VECTSTRING; // lpszToken like _T ( ",%"), a character string that contains resolved by pvtDest output 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;} ///