Mail Archives: djgpp/2000/04/10/09:13:51
On Mon, 10 Apr 2000, Wojciech Galazka wrote:
> As you pointed out the handle returned by CreateFile() needs to be
> translated into a DOS file handle, this can be done using some undocumented
> calls to NTVDM. The good news is that it works faster than using int 21h,
> the bad news is that there are problemns with opening devices (like NUL) and
> some DOS calls don't work with that handles (as in the case with int 21h,
> ax=4400h)
Did you try to open the devices using the \\.\NUL syntax? I hope I don't
mess up the syntax used by Windows to refer to character devices, but
IIRC that is how you open a device using Win32 API calls.
> According to Schulman's "Undocumented DOS" there is some rudimentary SFT
> structure but it is different from the one used by DOS 5.
Yes, but AFAIK that SFT is not functional, in the sense that the cricual
information about the handles is not kept there (since Windows doesn't
need it). That SFT is created so that some programs which access it could
have an illusion of its existence. However, the authors of NTVDM clearly
didn't have DJGPP in mind when they created that SFT ;-)
> BTW Could you suggest any texts of how DPMI serwer works?. All I know is
> that for a DOS 32 bit DPMI program a LDT is created by DPMI server
> somewhere by NTVDM. It is probably possible to access that LDT from DPMI
> server side. But how to free a descriptor not used anymore by a program?
I don't think you can, although I never dug into this seriously.
- Raw text -