delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/04/10/09:13:51

Date: Mon, 10 Apr 2000 14:10:08 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Wojciech Galazka <wojciech DOT galazka AT polkomtel DOT com DOT pl>
cc: djgpp AT delorie DOT com
Subject: Re: fstat works incorrectly under Windows NT
In-Reply-To: <8cs0qj$95m$1@sunsite.icm.edu.pl>
Message-ID: <Pine.SUN.3.91.1000410140502.23677C-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019