Vahan Yoghoudjian
Schneider Electric
East Mediterranean s.a.l
Mike Shkolnik <[EMAIL PROTECTED]>
Sent by: [email protected]
05/11/2006 08:59 AM
Please respond to delphi-en
To: [email protected]
cc:
Subject: Re: [delphi-en] Current user name
Use the GetUserName function:
var
ComputerName: array[1..20] of Char;
UserName: array[1..512] of Char;
arrSize: dWord;
begin
arrSize := SizeOf(ComputerName);
GetComputerName(@ComputerName, arrSize);
arrSize := SizeOf(UserName);
GetUserName(@UserName, arrSize);
ShowMessage('Computer name is: ' + ComputerName +
#13#10 + 'User name is: ' + UserName)
end;
With best regards, Mike Shkolnik
EMail: [EMAIL PROTECTED]
http://www.scalabium.com
--- [EMAIL PROTECTED] wrote:
> Hi Group
>
> How can I know the name of the user currently logged
> in? Note that it
> might be a local user or a user created on a
> domain... I searched in the
> registry but could not find the right key.
>
> Thank you in advance
>
> Vahan Yoghoudjian
> Schneider Electric
> East Mediterranean s.a.l
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]
Yahoo! Groups Links
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
This is a service contracted by Schneider Electric to avoid Spam.
______________________________________________________________________
[Non-text portions of this message have been removed]
-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]
YAHOO! GROUPS LINKS
- Visit your group "delphi-en" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

