... vielleicht hilft folgendes
Delphi-Quellcode:
...
function ADsGetObject(pwcPathName: PWideChar;
const xRIID: TGUID;
var pVoid): HResult;
stdcall;
external '
activeds.dll';
...
function TForm1.GetUserFullname(Domain, Username:
String):
string;
var
usr: IADSUser;
pc:
array[0..255]
of WideChar;
s:
String;
begin
s:='
WinNT://' + Domain + '
/' + username;
StringToWideChar(S,PC,Length(S)+1);
ADsGetObject(pc, IADsUser, usr);
if not Assigned(usr)
then
result := '
Unknown'
else
result := usr.FullName;
end;
Gruß MarLe