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 name with: TFileName.lpstrFile:=Pchar(DefaultFileName); 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. James
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal