Solved

File open problem

Posted on 1999-01-08
3
148 Views
Last Modified: 2010-04-06
How can I open a typed file on a read-only drive and read it ? (I tried with the assignfile-reset methods but an error like "file access refused" happens, even if I only want to read it.) HELP!!
0
Comment
Question by:logosapience
3 Comments
 
LVL 20

Expert Comment

by:Madshi
ID: 1355264
Hmm. You could use
  "TFileStream.Create('file.ext',fmOpenRead or fmShareDenyNone)"
However, you said "typed file", so I don't know if this helps...

Regards, Madshi.
0
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 50 total points
ID: 1355265
Set Filemode to fmOpenRead before calling ResetFile. Remember to set it back again once you are finished.

CHeers,

Raymond.
0
 
LVL 1

Author Comment

by:logosapience
ID: 1355266
thanx very much
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

830 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