55 references to Advapi32
System.Security.Principal.Windows (55)
_generated\0\LibraryImports.g.cs (19)
399internal static partial uint LsaLookupNames2(global::Microsoft.Win32.SafeHandles.SafeLsaPolicyHandle handle, int flags, int count, global::Interop.Advapi32.MARSHALLED_UNICODE_STRING[] names, out global::Microsoft.Win32.SafeHandles.SafeLsaMemoryHandle referencedDomains, out global::Microsoft.Win32.SafeHandles.SafeLsaMemoryHandle sids) 406global::Interop.Advapi32.MARSHALLED_UNICODE_STRING.Marshaller.Native* __names_native = default; 413scoped global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Interop.Advapi32.MARSHALLED_UNICODE_STRING, global::Interop.Advapi32.MARSHALLED_UNICODE_STRING.Marshaller.Native>.ManagedToUnmanagedIn __names_native__marshaller = new(); 419__names_native__marshaller.FromManaged(names, stackalloc global::Interop.Advapi32.MARSHALLED_UNICODE_STRING.Marshaller.Native[global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Interop.Advapi32.MARSHALLED_UNICODE_STRING, global::Interop.Advapi32.MARSHALLED_UNICODE_STRING.Marshaller.Native>.ManagedToUnmanagedIn.BufferSize]); 421global::System.ReadOnlySpan<global::Interop.Advapi32.MARSHALLED_UNICODE_STRING> __names_native__managedSpan = __names_native__marshaller.GetManagedValuesSource(); 422global::System.Span<global::Interop.Advapi32.MARSHALLED_UNICODE_STRING.Marshaller.Native> __names_native__nativeSpan = __names_native__marshaller.GetUnmanagedValuesDestination(); 425__names_native__nativeSpan[__i0] = global::Interop.Advapi32.MARSHALLED_UNICODE_STRING.Marshaller.ConvertToUnmanaged(__names_native__managedSpan[__i0]); 461global::System.ReadOnlySpan<global::Interop.Advapi32.MARSHALLED_UNICODE_STRING.Marshaller.Native> __names_native__nativeSpan = __names_native__marshaller.GetUnmanagedValuesDestination(); 464global::Interop.Advapi32.MARSHALLED_UNICODE_STRING.Marshaller.Free(__names_native__nativeSpan[__i0]); 476static extern unsafe uint __PInvoke(nint __handle_native, int __flags_native, int __count_native, global::Interop.Advapi32.MARSHALLED_UNICODE_STRING.Marshaller.Native* __names_native, nint* __referencedDomains_native, nint* __sids_native); 980internal static partial int LsaLogonUser(global::Microsoft.Win32.SafeHandles.SafeLsaHandle LsaHandle, in global::Interop.Advapi32.LSA_STRING OriginName, global::Interop.SspiCli.SECURITY_LOGON_TYPE LogonType, int AuthenticationPackage, nint AuthenticationInformation, int AuthenticationInformationLength, nint LocalGroups, in global::Interop.SspiCli.TOKEN_SOURCE SourceContext, out global::Microsoft.Win32.SafeHandles.SafeLsaReturnBufferHandle ProfileBuffer, out int ProfileBufferLength, out global::Interop.LUID LogonId, out global::Microsoft.Win32.SafeHandles.SafeAccessTokenHandle Token, out global::Interop.SspiCli.QUOTA_LIMITS Quotas, out int SubStatus) 1007fixed (global::Interop.Advapi32.LSA_STRING* __OriginName_native = &OriginName) 1038static extern unsafe int __PInvoke(nint __LsaHandle_native, global::Interop.Advapi32.LSA_STRING* __OriginName_native, global::Interop.SspiCli.SECURITY_LOGON_TYPE __LogonType_native, int __AuthenticationPackage_native, nint __AuthenticationInformation_native, int __AuthenticationInformationLength_native, nint __LocalGroups_native, global::Interop.SspiCli.TOKEN_SOURCE* __SourceContext_native, nint* __ProfileBuffer_native, int* __ProfileBufferLength_native, global::Interop.LUID* __LogonId_native, nint* __Token_native, global::Interop.SspiCli.QUOTA_LIMITS* __Quotas_native, int* __SubStatus_native); 1047internal static partial int LsaLookupAuthenticationPackage(global::Microsoft.Win32.SafeHandles.SafeLsaHandle LsaHandle, ref global::Interop.Advapi32.LSA_STRING PackageName, out int AuthenticationPackage) 1060fixed (global::Interop.Advapi32.LSA_STRING* __PackageName_native = &PackageName) 1076static extern unsafe int __PInvoke(nint __LsaHandle_native, global::Interop.Advapi32.LSA_STRING* __PackageName_native, int* __AuthenticationPackage_native);
src\runtime\src\libraries\Common\src\Interop\Windows\SspiCli\Interop.LsaLogonUser.cs (1)
16in Advapi32.LSA_STRING OriginName,
src\runtime\src\libraries\Common\src\Interop\Windows\SspiCli\Interop.LsaLookupAuthenticationPackage.cs (1)
15ref Advapi32.LSA_STRING PackageName,
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeLsaMemoryHandle.cs (1)
21return Interop.Advapi32.LsaFreeMemory(handle) == 0;
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeLsaPolicyHandle.cs (1)
20return Interop.Advapi32.LsaClose(handle) == 0;
System\Security\Principal\NTAccount.cs (5)
222Interop.Advapi32.MARSHALLED_UNICODE_STRING[] Names = new Interop.Advapi32.MARSHALLED_UNICODE_STRING[sourceAccounts.Count]; 251LsaHandle = Win32.LsaOpenPolicy(null, Interop.Advapi32.PolicyRights.POLICY_LOOKUP_NAMES); 260ReturnCode = Interop.Advapi32.LsaLookupNames2(LsaHandle, 0, sourceAccounts.Count, Names, out ReferencedDomainsPtr, out SidsPtr); 283uint win32ErrorCode = Interop.Advapi32.LsaNtStatusToWinError(ReturnCode);
System\Security\Principal\SID.cs (3)
979LsaHandle = Win32.LsaOpenPolicy(null, Interop.Advapi32.PolicyRights.POLICY_LOOKUP_NAMES); 987ReturnCode = Interop.Advapi32.LsaLookupSids(LsaHandle, sourceSids.Count, SidArrayPtr, out ReferencedDomainsPtr, out NamesPtr); 1010uint win32ErrorCode = Interop.Advapi32.LsaNtStatusToWinError(ReturnCode);
System\Security\Principal\Win32.cs (8)
22Interop.Advapi32.PolicyRights rights) 26uint error = Interop.Advapi32.LsaOpenPolicy(systemName, ref attributes, (int)rights, out SafeLsaPolicyHandle policyHandle); 45uint win32ErrorCode = Interop.Advapi32.LsaNtStatusToWinError(error); 110if (Interop.BOOL.FALSE == Interop.Advapi32.ConvertStringSidToSid(stringSid, out pSid)) 158if (FALSE != Interop.Advapi32.CreateWellKnownSid((int)sidType, domainSid?.BinaryForm, resultSid, ref length)) 189return (Interop.Advapi32.IsEqualDomainSid(BinaryForm1, BinaryForm2, out bool result) == FALSE ? false : result); 211if (FALSE != Interop.Advapi32.GetWindowsAccountDomainSid(BinaryForm, resultSidBinary, ref sidLength)) 238if (FALSE == Interop.Advapi32.IsWellKnownSid(BinaryForm, (int)type))
System\Security\Principal\WindowsIdentity.cs (14)
19using LSA_STRING = Interop.Advapi32.LSA_STRING; 146if (!Interop.Advapi32.AllocateLocallyUniqueId(&sourceContext.SourceIdentifier)) 266if (!Interop.Advapi32.GetTokenInformation( 484!Interop.Advapi32.DuplicateTokenEx(_safeTokenHandle, 495if (!Interop.Advapi32.CheckTokenMembership((til != TokenImpersonationLevel.None ? _safeTokenHandle : token), 779if (!Interop.Advapi32.RevertToSelf()) 784if (!token.IsInvalid && !Interop.Advapi32.ImpersonateLoggedOnUser(token)) 799if (!Interop.Advapi32.RevertToSelf()) 804if (!Interop.Advapi32.ImpersonateLoggedOnUser(args.CurrentValue)) 848uint win32ErrorCode = Interop.Advapi32.LsaNtStatusToWinError((uint)status); 856bool success = Interop.Advapi32.OpenThreadToken(desiredAccess, WinSecurityContext.Both, out SafeAccessTokenHandle safeTokenHandle); 878if (!Interop.Advapi32.OpenProcessToken(Interop.Kernel32.GetCurrentProcess(), desiredAccess, out SafeAccessTokenHandle safeTokenHandle)) 914Interop.Advapi32.GetTokenInformation(tokenHandle, 927bool result = Interop.Advapi32.GetTokenInformation(tokenHandle,
System\Security\Principal\WindowsPrincipal.cs (2)
153if (!Interop.Advapi32.DuplicateTokenEx(_identity.AccessToken, 167if (!Interop.Advapi32.CheckTokenMembership((_identity.ImpersonationLevel != TokenImpersonationLevel.None ? _identity.AccessToken : token),