Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2007 Feb : Getting "WhoAmI" from a domain?
| Subject: | Getting "WhoAmI" from a domain? |
| Posted by: | nospam@gmail.com |
| Date: | Tue, 6 Feb 2007 14:17:18 |
I VPN to multiple domains, but a specific application I'm writing is only is
conserned with ONE domain.
Is there a way to query that domain to find out the user name logged in as?
I'd like to write a function like:
function WhoAmI ( domainName: string) : string;
begin
//real stuff goes here to get the user name
result := 'logged into ' + domainName + ' as ' + UserName;
end;