|
<< Click to Display Table of Contents >> Delphi Examples: DbiGetNetUserName |
![]() ![]()
|
Return the user's network login name.
User names are available for all networks supported by Microsoft Windows.
This example uses the following input:
MyName := GetMyNetUserName;
The function is:
function GetMyNetUserName: String;
begin
SetLength(Result, dbiMaxUserNameLen + 1);
Check(DbiGetNetUserName(PChar(Result)));
SetLength(Result, StrLen(PChar(Result)));
end;