If you want to convert raw data to a string you should assign the stream holding the data to a TStringStream. ReadAnsiString can only read data written with WriteAnsiString (or if you took care to imitate it's format). -- Felipe Monteiro de Carvalho