Solved

How do I open a TFileStream

Posted on 1998-03-08
3
211 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
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

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…
This video discusses moving either the default database or any database to a new volume.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now