Reply-To: "Dan Russell" From: "Dan Russell" Newsgroups: borland.public.delphi.objectpascal References: <3ae86c5b$1_1@dnews> Subject: Re: TFileStream to IStream Date: Thu, 26 Apr 2001 17:17:26 -0700 Lines: 31 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 NNTP-Posting-Host: 209.242.148.46 Message-ID: <3ae8b9f0$1_1@dnews> X-Trace: dnews 988330480 209.242.148.46 (26 Apr 2001 17:14:40 -0700) Path: dnews Xref: dnews borland.public.delphi.objectpascal:186151 Doug, You have to use a TStringAdapter as in: procedure TForm1.Button1Click(Sender: TObject); var S: IStream; FS: TFileStream; begin FS := TFileStream.Create('c:\output.txt', fmOpenRead); try S := TStreamAdapter.Create(FS); // do whatever with S finally FS.Free; end; end; Regards, Dan... "Doug" wrote in message news:3ae86c5b$1_1@dnews... How do I get an IStream from a TFileStream? Doug Laakso Doug.Laakso@lc.ca.gov