Solved

File open problem

Posted on 1999-01-08
3
142 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

757 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