2009/1/14 Reenen Laurie <rlau...@gmail.com>: > > {$ifdef windows} > username := GetEnvironmentVariable('USERNAME'); > {$endif}
Nope, change that to something like: var userNameBuffer: array[0..255] of char; sizeBuffer: DWord; begin SizeBuffer := 256; getUserName(userNameBuffer, sizeBuffer); result := string(userNameBuffer); > {$ifdef linux} > GetUserData(FpGetuid, Data); > username := Data.pw_uid; > {$endif} > > How about MacOS? Change that to {$ifdef unix} instead. Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _______________________________________________ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus