I'm attempting to convert a string to a TStream. My code below gives me an "Abstract Error" message on the CopyFrom line. I'm against a brick wall here, any ideas on how to solve this?
procedure StringToStream(const AString: string; out AStream: TStream);
var
SS: TStringStream;
begin
SS := TStringStream.Create(AString);
try
SS.Position := 0;
AStream.CopyFrom(SS, SS.Size); //This is where the "Abstract Error" gets thrown
finally
SS.Free;
end;
end;