BOOL CReg::Parse(LPCTSTR pStr, DWORD size, char sep) {_STTEX(); DWORD line = 0; DWORD s = 0, e = 0; if ( size == 0 ) size = strlen( pStr ); while ( s < size && e < size ) { // Find start of data while ( s < size && ( pStr[ s ] <= ' ' || pStr[ s ] > '~' ) ) s++; e = s; // Find the end of the data BOOL data = FALSE; while ( e < size && ( pStr[ e ] >= ' ' && pStr[ e ] <= '~' ) ) { if ( pStr[ e ] > ' ' ) data = TRUE; e++; } // Add to reg if ( e > s ) { CStr str( line++ ); CRKey *pRk = GetKey( str ); if ( pRk != NULL ) pRk->Parse( &pStr[ s ], e - s, sep ); } // end if // Skip data s = e; } // end while return TRUE; }