[fpc-pascal] Function for checking correct file name
Sven Barth
pascaldragon at googlemail.com
Sat Sep 15 11:20:53 CEST 2012
On 14.09.2012 17:44, Graeme Geldenhuys wrote:
> On 14/09/12 13:48, Krzysztof wrote:
>> I just quicky googled not allowed characters and wrote this simple
>> function:
>
> Also in Windows (as far as I know), file names my not be longer than 255
> characters. So you will have to check the length of AFilename parameter
> too.
It depends. If you use normal "C:\bla\bla" notation you are right, but
if you access the NT namespace (which you can do from within the WinAPI)
you can use paths with up to 32767 characters. You need to use this
notation though: "\\?\C:\bla\bla" (in this case you MUST use "\" though
as "/" is not converted here).
For more information see here:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx#maxpath
Regards,
Sven
More information about the fpc-pascal
mailing list