Solved

How do I open a TFileStream

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Thread safe  opinion 7 126
how to update exe applicatio from internet ? 6 68
JAudiorecorder record freezing the app 29 60
update joined tables 2 31
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

895 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

20 Experts available now in Live!

Get 1:1 Help Now