(a)
CSid Sid1(pSid); // pointer to a SID struct

(b)
CSid Sid2, Sid3;

(c)
Sid2.SetSidFromString(L"S-1-5-1234-1234");

(d)
Sid3.SetSidFromName(L"MyDomain\Administrator");

(e)
CSid Sid4(WKS_AuthenticatedUsers);

Example 1: Populating a CSid. (a) from another CSid; (b) from a SID structure; (c) from a string format; (d) from an Account Name; (e) from a Well-Known SID.

Back to Article