Is there a way to open the preference file "readonly"?
What I'm after is to be able to launch multiple copies of an exe, and use the same ini file -- but since it's opened for read/write - only the 1st one can use it.
I know I can open/close the file at start; but his still leaves an opening for another copy to fail the open.
I haven't been able to get the windows createmutex() to work so that I can have a system-wide mutex; that was my 1st route..
OpenPreferences() -- Readonly?
Re: OpenPreferences() -- Readonly?
I can't confirm your problem.
I can open the same preference file as many times as I like.
I can open the same preference file as many times as I like.
Re: OpenPreferences() -- Readonly?
What about SetFileAttributes(Filename$, Attributes) ?
Or
Search for Open file as shared by mk-soft
Or
Search for Open file as shared by mk-soft
Egypt my love
Re: OpenPreferences() -- Readonly?
Hmm. very odd -- I create two exe's and they both attempt to open up the same ini file; the 2nd one is denied... Oh well.TomS wrote:I can't confirm your problem.
I can open the same preference file as many times as I like.
- DoubleDutch
- Addict

- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
Re: OpenPreferences() -- Readonly?
Yes, a flag for opening read only would be good.
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
-
TerryHough
- Enthusiast

- Posts: 781
- Joined: Fri Apr 25, 2003 6:51 pm
- Location: NC, USA
- Contact:
Re: OpenPreferences() -- Readonly?
DoubleDutch wrote:Yes, a flag for opening read only would be good.
