First post, by TBJ
Hi all,
I am new to C++ coding so please bear with me (lifelong BASIC/VB/.NET developer). I'm trying to modify the DOSBOX source to implement file locking - obviously the trapping of the function is already done in the Int21H handler (function 5c) , I am just trying to make it actually lock the file (I am trying to make an old accounting package run in DOSBOX which requires file locking). Once I've got it all together I will of course post the source, not that there will be much of it.
Basically I am just wondering if anyone can give me any pointers on how, inside the Int21H handler function, I can get the C++ internal file handle for a file so I can call C's Lock() function. I know that I can get the DOS_FILE object corresponding to the open file by doing something like:
Files[RealHandle(Reg_BX)]
I am doing all this from memory so it might not be 100% accurate.
All I need to do is get the C++ file handle to the file so I can lock it. Has anyone got any suggestions?
Cheers and thanks for writing a great piece of software 😁