git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Implementing stat() with FindFirstFile()

From
MBMagnus Bäck <baeck@swipnet.se>
Date
Mar 31, 2009, 20:32 UTC
Message-ID
<20090331203248.GE27249@jeeves.jpl.local>
In-Reply-To
<alpine.DEB.1.00.0903310128410.10279@pacific.mpi-cbg.de>
On Tuesday, March 31, 2009 at 01:29 CEST,
     Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 16 quoted lines
> On Tue, 31 Mar 2009, Heiko Voigt wrote:
> 
> > On Mon, Mar 30, 2009 at 07:11:18AM +0200, Björn Steinbrink wrote:
> >
> > > Not official documentation, but at least from some MS guy it seems: 
> > > http://www.osronline.com/showThread.cfm?link=73086 (last message).
> > > 
> > > Apparently, it was in NT3.x, but they document only what's actually 
> > > defined in the header.
> > 
> > How about runtime checking? You could do GetProcAddress(...) and if
> > you don't get it use the old behaviour. I mean if it really is
> > faster why not let Users of recent systems benefit from it.
> 
> While my first reaction was negative, I have to admit that thinking
> about it longer, it does seem to make a whole lot of sense.

If anything worries me it's forward compatibility should Microsoft change the function signature. Backwards compatibility can always be guaranteed by using GetProcAddress(). Again, I would be very surprised but IF it could be quite fatal.

Anyway, we don't know for sure if it's faster or if it fixes the DST problem of FindFirstFile(). I'll write some code to try it out.

-- 
Magnus Bäck
baeck@swipnet.se
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 12 of 14 in “Implementing stat() with FindFirstFile()”
  1. Magnus BäckMar 21, 2009
  2. Johannes SixtMar 21, 2009
  3. Magnus BäckMar 24, 2009
  4. Johannes SixtMar 26, 2009
  5. Magnus BäckMar 26, 2009
  6. Johannes SchindelinMar 27, 2009
  7. Magnus BäckMar 29, 2009
  8. Johannes SchindelinMar 30, 2009
  9. Björn SteinbrinkMar 30, 2009
  10. Heiko VoigtMar 30, 2009
  11. Johannes SchindelinMar 30, 2009
  12. Magnus BäckMar 31, 2009
  13. Johannes SchindelinMar 31, 2009
  14. Nazri RamliyApr 1, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.