There is not much to write about how you can obtain the user’s SID.

Use these members

  1. uses JwsclKnownSid, JwsclSid;
  2. var SID : TJwSecurityID;
  3. begin
  4.   SID := JwSecurityCurrentThreadUserSID;
  5.   WriteLn(SID.GetText(true));
  6.   SID.Free;
  7. 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.

Send post as PDF to www.pdf24.org
convert this post to pdf.