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

Frederic Da Vitoria davitofrg at gmail.com
Tue Nov 26 16:04:57 CET 2013


2013/11/26 Reinier Olislagers <reinierolislagers at gmail.com>

> On 26/11/2013 15:43, Frederic Da Vitoria wrote:
> > 2013/11/26 Craig Peterson <craig at scootersoftware.com
> > <mailto:craig at scootersoftware.com>>
> >     On Nov 26, 2013, at 7:59 AM, Richard Mace <richard.mace at gmail.com
> >     <mailto: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.
> > Richard wanted to delete his file programmatically, of course, else he
> > wouldn't be asking his question in this list :-P
>
> I think Craig understands that - how do you intend to call APIs from the
> command line? (Yes, rundll probably but ok).
> Otherwise, could you explain a bit more?
>
> BTW: IIRC, there was a huge discussion about using the unicode API for
> (once again IIRC) exactly the file deletion/manipulation API calls in
> the FPC list. @Richard: you could have a search through there...
>

Obviously Craing understood, and I did not. I was laughing at myself :-)

-- 
Frederic Da Vitoria
(davitof)

Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20131126/23964a3c/attachment-0003.html>


More information about the Lazarus mailing list