> Once I have a file in a TFileStream
> How do I join the two together so I can out put it as one file
> Q1 := TFileStream.Create(curDir + 'Qtop.doc',fmOpenRead or
> fmShareDenyWrite);
> Q2 := TFileStream.Create(curDir + 'Qbody.doc',fmOpenRead or
> fmShareDenyWrite);
> with TFileStream.Create(curDir + 'Qdone.doc',fmCreate or fmShareExclusive)
> do try
> CopyFrom(Q3, Q3.Size);
> finally
> Free;
> end;
close... but this copies the remaining bytes from Q3?
var
Q1,Q2 :TStream;
begin
Q1 := nil;
Q2 := nil;
try
Q1 := TFileStream.Create(curDir+'QTop.Doc',
fmOpenRead or fmShareDenyWrite);
Q2 := TFileStream.Create(curDir+'QBody.Doc',
fmOpenRead or fmShareDenyWrite);
with TFileStream.Create(curDir+'QDone.Doc',
fmCreate or fmShareExclusive) do try
CopyFrom(Q1,0); // Copy entire stream from offset 0
CopyFrom(Q2,0); // Copy entire stream from offset 0
finally
Free;
end;
finally
Q1.Free;
Q2.Free;
end;
end;
--
Aaron Scott-Boddendijk
Jump Productions
(07) 838-3371 Voice
(07) 838-3372 Fax
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz