Solved

How do I open a TFileStream

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

691 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