Date: Thu, 16 Aug 2001 09:18:00 +0300 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: wojciech DOT galazka AT polkomtel DOT com DOT pl Message-Id: <2950-Thu16Aug2001091800+0300-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9 CC: djgpp-workers AT delorie DOT com In-reply-to: <250B3114DA16D511B82C00E0094005F8023FC080@MSGWAW11> (message from =?windows-1250?Q?Wojciech_Ga=B3=B9zka?= on Wed, 15 Aug 2001 22:49:38 +0200) Subject: Re: Fw: Fstat.c patch References: <250B3114DA16D511B82C00E0094005F8023FC080 AT MSGWAW11> Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: =?windows-1250?Q?Wojciech_Ga=B3=B9zka?= > Date: Wed, 15 Aug 2001 22:49:38 +0200 > > > We need to find a way to determine the drive letter where a file lives > > given only a handle on which that file is open... Any ideas? > > Won't the JFT/SFT trick work given a file handle? It will, if someone points us to the documentation of the Windows 2000 SFT structure, and how to get to it. The way to do that on DOS is documented in several resources, but I'm not aware of similar documentation for Windows. (Actually, I'm quite confident W2K won't let us access its internal structures, even if we knew how. It simply doesn't let applications access the upper half of the memory address space. You can't even create a segment descriptor that spans some memory whose addresses have the high bit set.)