Hi,
I'm sorry, I don't know what you want. Your code sample does not show what you tried and what you want to achieve. Do you want to load the contents of many file into one stream? This can be achieved by adding the contents to the end of the memory stream.
Delphi-Quellcode:
Procedure AddFileToStream (aStream : TStream; aFile : String);
Var
filestream : TFileStream;
Begin
filestream := TFileStream.Create (aFile, fmOpenRead);
Try
aStream.CopyFrom (filestream, filestream.Size);
Finally
filestream.Free;
End
End;
Btw: In your code sample, you don't have to set any of the 'Size' or 'Position' properties. This is done by the constructor and the CopyFrom method, by setting the Size-parameter to 0.
HTH.