Re: FindFirstFileExW and MAX_PATH




"Egbert Nierop" <egbert_nierop@xxxxxxxxxxxxxx> wrote in message
news:eRuk1nyTIHA.4696@xxxxxxxxxxxxxxxxxxxxxxx

I find it so interesting, that even a 64 bit OS, still uses that API,
limited to 260 (249 in fact) characters for directories and files.

The complete path and filename together is limited to MAX_PATH characters by
default, yes.

FindFirstFileExW tells us about the \\?\ prefix, to overcome that
limit, BUT the WIN32_FIND_DATA structure, contains just
260 characters for the cFilename section! :)

The cFilename member receives just the filename, not the complete path
leading up to the filename. When '\\?\' is used, individual components of a
path (aka each subfolder and file name) are each limited to 255 characters
max. So receiving such a filename still fits within a buffer of MAX_PATH
size regardless of whether '\\?\' is used or not.


Gambit


.



Relevant Pages

  • Re: determine default filename encoding
    ... > Suse tech support for the way filename characters are represented, ... Characters are characters - just bytes. ... Then if that coding differed from the LANG coding ... filenames that were written in encoding X as they were written, ...
    (comp.os.linux.setup)
  • Re: unix filename restriction
    ... underscore _ and the dot. ... You could use other characters, ... never met a *human* defined path of more than 80 chars (most of the ... If you want to be very sure, limit your filename to the DOS limit of 8 ...
    (comp.os.linux.development.apps)
  • Re: Error Message: "The File Name is Not Valid or Too Long...."
    ... I, then, proceed to name that file using only valid characters. ... the destination folder. ... That is not counting the drive letter and slashes or the filename itself. ... (Again - not counting the extension/dot.) ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: Cannot delete files
    ... There HAS to be an 8.3 filename! ... I've not been brave enough to tell it Yes on THIS folder, ... characters don't look quite the same in this email font; ... but the SFN was "NOD~1.EE". ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: Characters allow in the title
    ... I guess that like many features in Word, this is one that is sort of there ... Charles Kenyon ... >> characters. ... >>> cause the filename taken from the title field to break. ...
    (microsoft.public.word.newusers)