Subject: Re: Implementing stat() with FindFirstFile()

From: Magnus Bäck <[email-masked]>
Date: Thu, 26 Mar 2009 22:39:07 +0100

On Thursday, March 26, 2009 at 08:15 CET,
     Johannes Sixt <[email-masked]> wrote:

> Magnus Bäck schrieb:
>
> > From what I gather the problematic conversion takes place in
> > the Win32 layer, in which case we might be able to call the
> > ZwQueryDirectoryFile() kernel routine directly via ntdll.dll
> > to obtain the file times straight from the file system. Has
> > anyone explored that path, and would it be acceptable to make
> > such a change?
>
> It depends.
>
> The disadvantages are that this function is only available on
> Windows XP and later and that it is not present in the header
> files of MinGW gcc.

I'd be very surprised if ZwQueryDirectoryFile() hasn't always
been around (I just verified ntdll.dll from NT 4.0), so that's
not a worry. Don't know why MSDN reports it as introduced in XP.

> It's on you to prove that there are advantages that clearly
> outweigh these disadvantages.

All right, I'll see if I can find time to take a look at this.
I just wanted to check that it wasn't a project policy or whatever
to bypass Win32.

-- 
Magnus Bäck
[email-masked]