char charBuf[256];

〜

AnsiString ansiBuf = (AnsiString)charBuf;