> 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 _______________________________________________ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal