How to get the user’s SID.
18
Mar
Posted by: Christian Wimmer in: JEDI Windows Security Code Lib
There is not much to write about how you can obtain the user’s SID.
Use these members
-
uses JwsclKnownSid, JwsclSid;
-
var SID : TJwSecurityID;
-
begin
-
SID := JwSecurityCurrentThreadUserSID;
-
WriteLn(SID.GetText(true));
-
SID.Free;
-
end;
The SID is either obtained from the thread token or - if it does not exist - from the process token.
Tell me how you liked this blog entry by adding a comment.
convert this post to pdf.
Leave a reply