[Lazarus] Deleteing a file that has a path that's longer than 256 characters

Craig Peterson craig at scootersoftware.com
Tue Nov 26 15:40:28 CET 2013

On Nov 26, 2013, at 7:59 AM, Richard Mace <richard.mace at gmail.com> wrote:
> I have an issue where I am unable to delete a file where the path name is longer than 256 characters.

You need to call the Unicode variant of the file APIs and add \\?\ to the start of the path in order to interact with paths longer than MAX_PATH.  See http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath for details.

Craig Peterson
Scooter Software
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20131126/2be4a960/attachment-0003.html>

More information about the Lazarus mailing list