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

◆ LookupAuthenticationPackage()

static unsafe int System.Security.Principal.WindowsIdentity.LookupAuthenticationPackage ( SafeLsaHandle lsaHandle,
string packageName )
inlinestaticprivate

Definition at line 435 of file WindowsIdentity.cs.

436 {
437 byte[] bytes = Encoding.ASCII.GetBytes(packageName);
438 int AuthenticationPackage;
439 fixed (byte* ptr = &bytes[0])
440 {
441 global::Interop.Advapi32.LSA_STRING PackageName = new global::Interop.Advapi32.LSA_STRING((IntPtr)ptr, checked((ushort)bytes.Length));
442 int num = global::Interop.SspiCli.LsaLookupAuthenticationPackage(lsaHandle, ref PackageName, out AuthenticationPackage);
443 if (num < 0)
444 {
445 throw GetExceptionFromNtStatus(num);
446 }
447 }
448 return AuthenticationPackage;
449 }
static Exception GetExceptionFromNtStatus(int status)
static Encoding ASCII
Definition Encoding.cs:511

References System.Text.Encoding.ASCII, System.bytes, System.Runtime.Serialization.Dictionary, and System.Security.Principal.WindowsIdentity.GetExceptionFromNtStatus().

Referenced by System.Security.Principal.WindowsIdentity.WindowsIdentity().