[Lazarus] LoadLibrary fails on WinCE

Pavel Řezníček cigydd at gmail.com
Wed Dec 3 23:51:04 CET 2008

Thanks Marco.
I solved using GetUserData procedure from users unit.

  GetUserData(FpGetuid, Data);
  Result.Name:= Data.pw_name;
  Result.Real_name:= Data.pw_gecos;
  Result.User_id:= Data.pw_uid;
  Result.Group_id:= Data.pw_gid;
  Result.home_dir:= Data.pw_dir;
  Result.shell:= Data.pw_shell;

Marco van de Voort ha scritto:
> On Tue, Dec 02, 2008 at 10:02:57PM +0100, Andrea Mauri wrote:
>> there is a way in order to get the real name of a linux/windows user?
>> In order to get the login name (linux) I used:
>>   Result.Name:= GetEnvironmentVariable('USERNAME');
>>   if Result.Name = '' then
>>     Result.Name:= GetEnvironmentVariable('USER');
>> I know that in linux I can use libc (getpwuid(fpgetuid)^.pw_gecos) but I 
>> am trying to avoid use of libc.
> Have a look at the users package. This is afaik 2.2.2+ though.
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Dr. Andrea Mauri, PhD
Milano Chemometrics and QSAR Research Group
Department of Environmental Sciences
University of Milano-Bicocca 
P.zza della Scienza, 1
20126 Milano - Italy

Tel: ++39 02 64482801
mailto:andrea.mauri.75 at gmail.com

More information about the Lazarus mailing list