That's the one I'm talking about. thanks, Dmitry
On Sun, May 13, 2012 at 12:52 AM, Reinier Olislagers <reinierolislag...@gmail.com> wrote: > On 13-5-2012 5:59, dmitry boyarintsev wrote: >> I'm assuming that everyone is aware of the solution for this. >> Every unicode file name still has ANSI-dos name (aka ShortName). >> You could write a function that would return a short name based on >> unicode name of a file. And pass the short name to Assign File >> function. >> >> thanks, >> Dmitry > > Hi Dmitry, > > Do you mean the ShortName as the 8.3 name defined on this page: > http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx#file_and_directory_names > ... it states > "When you create a long file name, Windows may also create a short 8.3 > form of the name, called the 8.3 alias, and store it on disk also." > So it isn't compulsory to store the 8.3 filename - which is confirmed > later on by: > "8.3 aliasing cannot be disabled for specified volumes until Windows 7 > and Windows Server 2008 R2."... implying it can be disabled in Win7 and > 2K8R2 > > Looking at the GetShortPathName function > http://msdn.microsoft.com/en-us/library/windows/desktop/aa364989%28v=vs.85%29.aspx > ... the text itself only says the function can fail - not when it is > likely to failx. > Comment below does shed more light: > "GetShortPathName fails to create a short filename if the file doesn't > have a short file name."..."You can turn this option off by using the > "System Policy Editor" (Poledit.exe). Certain file systems also don't > support creation of short names by default" > > Or are you talking about a different way of getting a short name? > > Thanks, > Reinier > _______________________________________________ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal