Le 21/06/2021 à 03:04, James Richters a écrit :
Var
    ...
DefaulSaveAsFileName: Ansistring;

SaveAsFileNameBuffer: array[0..Max_Path+1] of char;

   ...

Begin

DefaulSaveAsFileName := 'X:\Something with a really really really long long long long file name to see if there is still a bug with really long filenames.tap';

...
SaveAsFileNameBuffer:=Pchar(DefaulSaveAsFileName);
...
This sounds a bit odd to me but it seems to work.
I would prefer to use

  StrPLCopy( SaveAsFileNameBuffer, DefaulSaveAsFileName, SizeOf(SaveAsFileNameBuffer));

instead of
SaveAsFileNameBuffer:=Pchar(DefaulSaveAsFileName);


_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to