[fpc-pascal]Synapse for FPC

Matt Emson memsom at interalpha.co.uk
Thu Jul 24 12:35:29 CEST 2003


> What about
>
> var username:AnsiString;
>
> begin
>  SetLength(Username,255);
>  GetUserName( pchar(Username), 255 );
>  Setlength(username,strlen(pchar(username));
> end
>
> Or does that mess up reference counts?


FPC may let you do that, but Delphi will have an error about not passing
const params iirc. That or the result is garbage back from Windows.

Matt






More information about the fpc-pascal mailing list