VOGONS

Common searches


DOSBox file locking

Topic actions

  • This topic is locked. You cannot reply or edit posts.

First post, by sc0ffer

User metadata
Rank Newbie
Rank
Newbie

Hello. I'm running a DOS programs in DOSBox on a few computers in network. This program open a text file for writing. In Windows XP i can open this file only from one instance of program - other instances shows error message (file is blocked by other user). But in DOSBox instances on Windows 10 it doesn't happend. Few users rewrites that file and getting data corruption. Looks like file oplocks doesn't work. Is there any options for file opening in DOSBox?

Reply 2 of 9, by sc0ffer

User metadata
Rank Newbie
Rank
Newbie
Qbix wrote:

Gve vdos a try.

if that doesn't work, send us an email (crew page on dosbox.com) as I have some code/builds that should work as well.

Thanks for reply. vDos seems to works right on file locking! Is there any hope that DOSBox will support this feature? Thanks anyway.

Reply 3 of 9, by olddos25

User metadata
Rank Member
Rank
Member

Not likely, because that isn't a function really neccesary for running games, which is DOSBox's main goal.

Currently mod on several Discord servs and a forum, so you can trust me if you want a DOSBox mod here!
Other places to find me:
DraStic: http://drastic-ds.com (as dsattorney)
EPForums: http://www.epforums.org (as emulationfan)

Reply 4 of 9, by mhw37

User metadata
Rank Newbie
Rank
Newbie

Hello,
The searches I have done on this forum indicate that DOSBOX will NOT initiate a "file locking" when many users are trying to access the same file which is shared but must have exclusive access, even if it is for fractions of a second. I have read that the DOSBOX goal is only for games. We were doing a proof of concept with old 16-bit executables and saw that the exclusive lock on certain files ended up crashing DOSBOX. This is in line with some of the posts I've read
Here are my questions:
1. Does the latest version of DOSBOX happen to support file locking?
(I see a post from Qbix "send us an email (crew page on dosbox.com) as I have some code/builds that should work as well")
2. To one or more of the DOSBOX creators: Am I correct in my discovery process in saying that DOSBOX does NOT support file locking? (I see a recommendation to try vDos which I will do)
Thank You

Reply 7 of 9, by mhw37

User metadata
Rank Newbie
Rank
Newbie
Wengier wrote on 2021-02-10, 08:50:

DOSBox-X 0.83.10 also supports file locking and other share functions. It is recommended to set “nocachedir=true” and “file access tries=3”. File operations like LFN are supported by DOSBox-X (ver=7.1 or lfn=true) but not vDos.

OK - questions - what does LFN stand for? Also, why do you say the vDos will not work when it has been recommended and verbally confirmed via other posts that it can handle file locks?

Reply 8 of 9, by Wengier

User metadata
Rank Member
Rank
Member
mhw37 wrote on 2021-02-10, 19:09:
Wengier wrote on 2021-02-10, 08:50:

DOSBox-X 0.83.10 also supports file locking and other share functions. It is recommended to set “nocachedir=true” and “file access tries=3”. File operations like LFN are supported by DOSBox-X (ver=7.1 or lfn=true) but not vDos.

OK - questions - what does LFN stand for? Also, why do you say the vDos will not work when it has been recommended and verbally confirmed via other posts that it can handle file locks?

I said “vDos will not work”? What did you mean? Re-read my message, I was saying that DOSBox-X 0.83.10 also supports file locking just like vDos. So just for the purpose of file locking, both of them will work. However, vDos does not support other file operations like LFN (which stands for long file names) which were also mentioned above, although they are separate file-operation features. DOSBox-X did not support file-locking back in 2018 so only vDos was recommended at that time, but DOSBox-X is completely free and open-source whereas vDos is no longer so and will show nag screens in networked environments unless it is registered.

Reply 9 of 9, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

And this is why we don't necropost.
Open your own thread for your own issue.
Closed

DOSBox Compilation Guides
DosBox Feature Request Thread
PC Game Compatibility List
How To Ask Questions The Smart Way
Running DRM games offline