[Lazarus] FileExistsUTF8 and long paths

Bart bartjunk64 at gmail.com
Sun Jan 17 15:25:13 CET 2016


On 1/17/16, Jürgen Hestermann <juergen.hestermann at gmx.de> wrote:

>  >> I did not find any comments that mentions long paths
>  > You need new glasses then ;-)
>  > === code ==
>  >   //if Filename uses ExtendedLengthPath scheme then it cannot be expanded
>  >   //AND it should not be altered by ForcePathDelims or ResolveDots
>  >   //See:
> http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx
>  >   if (Length(Fn) > 3) and (Fn[1] = PathDelim) and (Fn[2] = PathDelim) and
>  >      (Fn[3] = '?') and (Fn[4] = PathDelim) //Do NOT use
>  > AllowDirectorySeparators here!
>  >      then Exit;
>  > === end code ===
>
> I have read this but how is this related to \\?\ and long paths?
> What is ExtendedLengthPath scheme?
> I don't see any information about W functions and \\?\ prefix.
>

Quoted from the link:
"To specify an extended-length path, use the "\\?\" prefix. For
example, "\\?\D:\very long path"."

Maybe you need new eyes, not new glasses ;-)

Bart




More information about the Lazarus mailing list