GetLocalUserName (Windows, Lazarus)

apps, lazarus, pascal, win Add comments
function GetLocalUserName : string;
var
    Buffer : array[0..255] of char;
    Count : DWord;
begin
  Count := 256 + 1;
  GetUserName(Buffer, Count);
  Result := string(Buffer);
end;

Download example
Download source

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in