PhysiologyWeb Logo  Search
Share on Facebook Share on Twitter Share on LinkedIn Share on Pinterest Email Copy URL
PhysiologyWeb Loading...

Get the Logged-In User Name
Here is a simple Delphi function that returns the user name for the currently logged-in user. For additional Delphi code for the Windows operating system, see Useful Delphi Code for the Windows Operating System.
function LoggedInUserName: String;
Size: DWORD;
Name: Array[0..255] of char;
LoggedInUserName := '';
Size := 0;

Size := 256;
GetUserName(Name, Size);
LoggedInUserName := String(Name);

Posted: Saturday, June 17, 2023