Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Groups

IdentityReferenceCollection? System.Security.Principal.WindowsIdentity.Groups
get

Definition at line 225 of file WindowsIdentity.cs.

226 {
227 get
228 {
230 {
231 return null;
232 }
233 if (_groups == null)
234 {
235 IdentityReferenceCollection identityReferenceCollection = new IdentityReferenceCollection();
237 {
238 global::Interop.SID_AND_ATTRIBUTES[] array = new global::Interop.SID_AND_ATTRIBUTES[safeLocalAllocHandle.Read<global::Interop.TOKEN_GROUPS>(0uL).GroupCount];
239 safeLocalAllocHandle.ReadArray((uint)Marshal.OffsetOf<global::Interop.TOKEN_GROUPS>("Groups").ToInt32(), array, 0, array.Length);
240 global::Interop.SID_AND_ATTRIBUTES[] array2 = array;
241 for (int i = 0; i < array2.Length; i++)
242 {
243 global::Interop.SID_AND_ATTRIBUTES sID_AND_ATTRIBUTES = array2[i];
244 uint num = 3221225492u;
245 if ((sID_AND_ATTRIBUTES.Attributes & num) == 4)
246 {
247 identityReferenceCollection.Add(new SecurityIdentifier(sID_AND_ATTRIBUTES.Sid));
248 }
249 }
250 }
252 }
253 return _groups;
254 }
255 }
void Add(TKey key, TValue value)
static IntPtr OffsetOf(Type t, string fieldName)
Definition Marshal.cs:28
static SafeLocalAllocHandle GetTokenInformation(SafeAccessTokenHandle tokenHandle, TokenInformationClass tokenInformationClass, bool nullOnInvalidParam=false)
static int CompareExchange(ref int location1, int value, int comparand)