JCL Help:LookupAccountBySid@PSID@AnsiString@AnsiString@Boolean

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Returns the name and domain of an alias, user or group.


Pascal

 procedure LookupAccountBySid(Sid: PSID; out Name: AnsiString; out Domain: AnsiString; Silent: Boolean = False); overload;
procedure LookupAccountBySid(Sid: PSID; out Name: WideString; out Domain: WideString; Silent: Boolean = False); overload;


Parameters

Parameters Description
Sid: PSID Security Identifier of the account for which to lookup the domain and account-name.
out Name: AnsiString Returns the account-name of the principal identified by Sid.
out Domain: AnsiString Returns the domain-name in which the principal identified by Sid is located (if any).


Description

LookupAccountBySid looks up the domain and account-name of the principal identified by the supplied security identifier. This principal can be an alias, user or group either local or domain. If the function fails it raises an exception (EOSError).


About

Unit

JclSecurity


Donator

Marcel van Brakel


Notes

Under Windows 95/98/Millenium Edition, LookupAccountBySid always returns empty strings.


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page