tstream

Opening a TStream on stdin/stdout in a Delphi console app

I'm trying to write a Delphi console application that creates a TStream for its standard input, and another TStream for its standard output. (It will be launched by a host app with its input and output redirected to pipes, and will be passing binary data to/from that host app, so TStream will be much better-suited to the task than ReadL...

String to TStream

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 ...