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

◆ GetWindowsAccountDomainSid()

static int System.Security.Principal.Win32.GetWindowsAccountDomainSid ( SecurityIdentifier sid,
out SecurityIdentifier resultSid )
inlinestaticpackage

Definition at line 126 of file Win32.cs.

127 {
128 byte[] array = new byte[sid.BinaryLength];
129 sid.GetBinaryForm(array, 0);
130 uint resultSidLength = (uint)SecurityIdentifier.MaxBinaryLength;
131 byte[] array2 = new byte[resultSidLength];
132 if (global::Interop.Advapi32.GetWindowsAccountDomainSid(array, array2, ref resultSidLength) != 0)
133 {
134 resultSid = new SecurityIdentifier(array2, 0);
135 return 0;
136 }
137 resultSid = null;
138 return Marshal.GetLastWin32Error();
139 }

References System.array, System.Security.Principal.SecurityIdentifier.BinaryLength, System.Security.Principal.SecurityIdentifier.GetBinaryForm(), System.Runtime.InteropServices.Marshal.GetLastWin32Error(), and System.Security.Principal.SecurityIdentifier.MaxBinaryLength.

Referenced by System.Security.Principal.SecurityIdentifier.SecurityIdentifier(), and System.Security.Principal.SecurityIdentifier.GetAccountDomainSid().