55 references to Advapi32
System.Security.Principal.Windows (55)
_generated\0\LibraryImports.g.cs (19)
399
internal 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)
406
global::Interop.
Advapi32
.MARSHALLED_UNICODE_STRING.Marshaller.Native* __names_native = default;
413
scoped 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]);
421
global::System.ReadOnlySpan<global::Interop.
Advapi32
.MARSHALLED_UNICODE_STRING> __names_native__managedSpan = __names_native__marshaller.GetManagedValuesSource();
422
global::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]);
461
global::System.ReadOnlySpan<global::Interop.
Advapi32
.MARSHALLED_UNICODE_STRING.Marshaller.Native> __names_native__nativeSpan = __names_native__marshaller.GetUnmanagedValuesDestination();
464
global::Interop.
Advapi32
.MARSHALLED_UNICODE_STRING.Marshaller.Free(__names_native__nativeSpan[__i0]);
476
static 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);
980
internal 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)
1007
fixed (global::Interop.
Advapi32
.LSA_STRING* __OriginName_native = &OriginName)
1038
static 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);
1047
internal static partial int LsaLookupAuthenticationPackage(global::Microsoft.Win32.SafeHandles.SafeLsaHandle LsaHandle, ref global::Interop.
Advapi32
.LSA_STRING PackageName, out int AuthenticationPackage)
1060
fixed (global::Interop.
Advapi32
.LSA_STRING* __PackageName_native = &PackageName)
1076
static 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)
16
in
Advapi32
.LSA_STRING OriginName,
src\runtime\src\libraries\Common\src\Interop\Windows\SspiCli\Interop.LsaLookupAuthenticationPackage.cs (1)
15
ref
Advapi32
.LSA_STRING PackageName,
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeLsaMemoryHandle.cs (1)
21
return Interop.
Advapi32
.LsaFreeMemory(handle) == 0;
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeLsaPolicyHandle.cs (1)
20
return Interop.
Advapi32
.LsaClose(handle) == 0;
System\Security\Principal\NTAccount.cs (5)
222
Interop.
Advapi32
.MARSHALLED_UNICODE_STRING[] Names = new Interop.
Advapi32
.MARSHALLED_UNICODE_STRING[sourceAccounts.Count];
251
LsaHandle = Win32.LsaOpenPolicy(null, Interop.
Advapi32
.PolicyRights.POLICY_LOOKUP_NAMES);
260
ReturnCode = Interop.
Advapi32
.LsaLookupNames2(LsaHandle, 0, sourceAccounts.Count, Names, out ReferencedDomainsPtr, out SidsPtr);
283
uint win32ErrorCode = Interop.
Advapi32
.LsaNtStatusToWinError(ReturnCode);
System\Security\Principal\SID.cs (3)
979
LsaHandle = Win32.LsaOpenPolicy(null, Interop.
Advapi32
.PolicyRights.POLICY_LOOKUP_NAMES);
987
ReturnCode = Interop.
Advapi32
.LsaLookupSids(LsaHandle, sourceSids.Count, SidArrayPtr, out ReferencedDomainsPtr, out NamesPtr);
1010
uint win32ErrorCode = Interop.
Advapi32
.LsaNtStatusToWinError(ReturnCode);
System\Security\Principal\Win32.cs (8)
22
Interop.
Advapi32
.PolicyRights rights)
26
uint error = Interop.
Advapi32
.LsaOpenPolicy(systemName, ref attributes, (int)rights, out SafeLsaPolicyHandle policyHandle);
45
uint win32ErrorCode = Interop.
Advapi32
.LsaNtStatusToWinError(error);
110
if (Interop.BOOL.FALSE == Interop.
Advapi32
.ConvertStringSidToSid(stringSid, out pSid))
158
if (FALSE != Interop.
Advapi32
.CreateWellKnownSid((int)sidType, domainSid?.BinaryForm, resultSid, ref length))
189
return (Interop.
Advapi32
.IsEqualDomainSid(BinaryForm1, BinaryForm2, out bool result) == FALSE ? false : result);
211
if (FALSE != Interop.
Advapi32
.GetWindowsAccountDomainSid(BinaryForm, resultSidBinary, ref sidLength))
238
if (FALSE == Interop.
Advapi32
.IsWellKnownSid(BinaryForm, (int)type))
System\Security\Principal\WindowsIdentity.cs (14)
19
using LSA_STRING = Interop.
Advapi32
.LSA_STRING;
146
if (!Interop.
Advapi32
.AllocateLocallyUniqueId(&sourceContext.SourceIdentifier))
266
if (!Interop.
Advapi32
.GetTokenInformation(
484
!Interop.
Advapi32
.DuplicateTokenEx(_safeTokenHandle,
495
if (!Interop.
Advapi32
.CheckTokenMembership((til != TokenImpersonationLevel.None ? _safeTokenHandle : token),
779
if (!Interop.
Advapi32
.RevertToSelf())
784
if (!token.IsInvalid && !Interop.
Advapi32
.ImpersonateLoggedOnUser(token))
799
if (!Interop.
Advapi32
.RevertToSelf())
804
if (!Interop.
Advapi32
.ImpersonateLoggedOnUser(args.CurrentValue))
848
uint win32ErrorCode = Interop.
Advapi32
.LsaNtStatusToWinError((uint)status);
856
bool success = Interop.
Advapi32
.OpenThreadToken(desiredAccess, WinSecurityContext.Both, out SafeAccessTokenHandle safeTokenHandle);
878
if (!Interop.
Advapi32
.OpenProcessToken(Interop.Kernel32.GetCurrentProcess(), desiredAccess, out SafeAccessTokenHandle safeTokenHandle))
914
Interop.
Advapi32
.GetTokenInformation(tokenHandle,
927
bool result = Interop.
Advapi32
.GetTokenInformation(tokenHandle,
System\Security\Principal\WindowsPrincipal.cs (2)
153
if (!Interop.
Advapi32
.DuplicateTokenEx(_identity.AccessToken,
167
if (!Interop.
Advapi32
.CheckTokenMembership((_identity.ImpersonationLevel != TokenImpersonationLevel.None ? _identity.AccessToken : token),