Good way to check if file already opened? (GW-BASIC porting) (Developers)
Hello Laaca,
> You can use the exclusive file access. You probable open files via
> INT21h/AX=3Dh
> If you can control all access to files you can set the AL register to 12h
> (exclusive file access in R/W mode)
Thanks, that would be the neatest solution if it works.
Unfortunately the access control only works if share.exe (or share.com) functionality happens to be installed. If I try to open files with int 0x21, ax = 0x3d12 (say) on a system without share.exe, DOS basically just ignores the access control bits and always allows the file to be opened.
So it might be that I will have to mess with the internal List of Lists (!), as Robert suggested.
Thank you!
---
https://gitlab.com/tkchia · https://codeberg.org/tkchia · 😴 "MOV AX,0D500H+CMOS_REG_D+NMI"
Complete thread:
- Good way to check if file already opened? (GW-BASIC porting) - tkchia, 02.02.2021, 14:35 (Developers)
- Good way to check if file already opened? (GW-BASIC porting) - Ringding, 02.02.2021, 20:57
- Good way to check if file already opened? (GW-BASIC porting) - tkchia, 04.02.2021, 09:05
- Good way to check if file already opened? (GW-BASIC porting) - rr, 02.02.2021, 21:16
- Good way to check if file already opened? (GW-BASIC porting) - Laaca, 02.02.2021, 22:18
- Good way to check if file already opened? (GW-BASIC porting) - tkchia, 13.02.2021, 19:23
- Good way to check if file already opened? (GW-BASIC porting) - Ringding, 02.02.2021, 20:57