[fpc-pascal] GetSaveFileNameA limited to 100 characters in default name
james.richters at productionautomation.net
Fri Jun 18 19:56:56 CEST 2021
I'm using GetSaveFileNameA() in a windows console program to obtain a
save-as directory and file name, I am passing sending it a default file
DefaultFileName is an AnsiString that contains a full path and filename.
This all works fine as long as DefaultFileName is 100 characters or less,
if it's 101 or more, then GetSaveFileNameA() never opens a dialog box and
just returns False;
Does anyone know where the 100 character limit is coming from?
TFileName.lpstrFile is a PChar, and DefaultFileName is an AnsiString,
Neither of which have a length limit that I know of.
I am doing a Writeln if Both DefaultFileName and TFileName.lpstrFile and
they both match, nothing is being truncated.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal