Solved

How do I open a TFileStream

Posted on 1998-03-08
3
233 Views
Last Modified: 2010-04-06
I am attempting to open a TFileStream in order to read/write
one file out to several files.  The problem is that when I attempt to open the stream i incur a access violation.  Where am I going wrong?  Unfortunately the help files are extremely lacking in this area....
0
Comment
Question by:tognettm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 5

Expert Comment

by:ronit051397
ID: 1360254
before opening, did you write TFileStream.Create?
0
 
LVL 1

Accepted Solution

by:
TheSwine earned 50 total points
ID: 1360255
var
  X : TFileStream;
  Buf : Byte;
begin
  X := TFileStream.Create('C:\Temp.Dat',fmCreate and fmOpenWrite);
  X.Write(Buf,SizeOf(Buf));
  X.Free;
end;

If you still have something not working please attach your code.
0
 

Author Comment

by:tognettm
ID: 1360256
Thanks for the help!  
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

731 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question