54 references to Advapi32
System.DirectoryServices.AccountManagement (54)
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\DirectoryServices\AccountManagement\AD\ADStoreCtx.cs (1)
1554
if (Interop.
Advapi32
.ConvertStringSidToSid(sddlSid, out pGroupSid) != Interop.BOOL.FALSE)
System\DirectoryServices\AccountManagement\AD\ADStoreCtx_LoadStore.cs (2)
529
if (Interop.
Advapi32
.IsValidSid(pSid) && (Utils.ClassifySID(pSid) == SidType.FakeObject))
584
if (Interop.
Advapi32
.IsValidSid(pSid) && (Utils.ClassifySID(pSid) == SidType.FakeObject))
System\DirectoryServices\AccountManagement\AD\ADStoreCtx_Query.cs (1)
503
if (Interop.
Advapi32
.ConvertStringSidToSid(urnValue, out pSid) != Interop.BOOL.FALSE)
System\DirectoryServices\AccountManagement\AD\SidList.cs (5)
89
uint err = Interop.
Advapi32
.LsaOpenPolicy(
92
(int)Interop.
Advapi32
.PolicyRights.POLICY_LOOKUP_NAMES,
102
Interop.
Advapi32
.LsaNtStatusToWinError(err)));
111
err = Interop.
Advapi32
.LsaLookupSids(
130
Interop.
Advapi32
.LsaNtStatusToWinError(err)));
System\DirectoryServices\AccountManagement\AuthZSet.cs (3)
282
bool success = Interop.
Advapi32
.EqualDomainSid(_psUserSid.DangerousGetHandle(), pSid, ref sameDomain);
329
if (Interop.
Advapi32
.EqualDomainSid(_psMachineSid.DangerousGetHandle(), pSid, ref inMachineDomain))
422
if (Utils.ClassifySID(pSid) == SidType.RealObject && Interop.
Advapi32
.EqualDomainSid(_psUserSid.DangerousGetHandle(), pSid, ref sameDomain))
System\DirectoryServices\AccountManagement\SAM\SAMStoreCtx_LoadStore.cs (2)
356
if (Interop.
Advapi32
.IsValidSid(pSid) && (Utils.ClassifySID(pSid) == SidType.FakeObject))
421
if (Interop.
Advapi32
.IsValidSid(pSid) && (Utils.ClassifySID(pSid) == SidType.FakeObject))
System\DirectoryServices\AccountManagement\Utils.cs (38)
125
if (Interop.
Advapi32
.ConvertSidToStringSid(pSid, out string sddlSid) != Interop.BOOL.FALSE)
176
int sidLength = Interop.
Advapi32
.GetLengthSid(pSid);
203
Debug.Assert(Interop.
Advapi32
.IsValidSid(pSid));
206
IntPtr pIdentAuth = Interop.
Advapi32
.GetSidIdentifierAuthority(pSid);
208
Interop.
Advapi32
.SID_IDENTIFIER_AUTHORITY identAuth = *(Interop.
Advapi32
.SID_IDENTIFIER_AUTHORITY*)pIdentAuth;
210
IntPtr pRid = Interop.
Advapi32
.GetSidSubAuthority(pSid, 0);
247
IntPtr pRidCount = Interop.
Advapi32
.GetSidSubAuthorityCount(pSid);
249
IntPtr pLastRid = Interop.
Advapi32
.GetSidSubAuthority(pSid, ridCount - 1);
316
bool success = Interop.
Advapi32
.EqualDomainSid(pCopyOfUserSid, pMachineDomainSid, ref sameDomain);
354
if (!Interop.
Advapi32
.OpenThreadToken(
367
if (!Interop.
Advapi32
.OpenProcessToken(
393
bool success = Interop.
Advapi32
.GetTokenInformation(
395
(uint)Interop.
Advapi32
.TOKEN_INFORMATION_CLASS.TokenUser,
414
success = Interop.
Advapi32
.GetTokenInformation(
416
(uint)Interop.
Advapi32
.TOKEN_INFORMATION_CLASS.TokenUser,
436
Debug.Assert(Interop.
Advapi32
.IsValidSid(pUserSid));
439
int userSidLength = Interop.
Advapi32
.GetLengthSid(pUserSid);
441
success = Interop.
Advapi32
.CopySid(userSidLength, pCopyOfUserSid, pUserSid);
474
uint err = Interop.
Advapi32
.LsaOpenPolicy(
477
(int)Interop.
Advapi32
.PolicyRights.POLICY_VIEW_LOCAL_INFORMATION,
481
GlobalDebug.WriteLineIf(GlobalDebug.Error, "Utils", "GetMachineDomainSid: LsaOpenPolicy failed, gle=" + Interop.
Advapi32
.LsaNtStatusToWinError(err));
485
Interop.
Advapi32
.LsaNtStatusToWinError(err)));
489
err = Interop.
Advapi32
.LsaQueryInformationPolicy(
496
GlobalDebug.WriteLineIf(GlobalDebug.Error, "Utils", "GetMachineDomainSid: LsaQueryInformationPolicy failed, gle=" + Interop.
Advapi32
.LsaNtStatusToWinError(err));
500
Interop.
Advapi32
.LsaNtStatusToWinError(err)));
506
Debug.Assert(Interop.
Advapi32
.IsValidSid(info.DomainSid));
509
int sidLength = Interop.
Advapi32
.GetLengthSid(info.DomainSid);
511
bool success = Interop.
Advapi32
.CopySid(sidLength, pCopyOfSid, info.DomainSid);
530
Interop.
Advapi32
.LsaFreeMemory(pBuffer);
607
int f = Interop.
Advapi32
.LookupAccountSid(serverName, sid, null, ref nameLength, null, ref domainNameLength, out accountUsage);
624
f = Interop.
Advapi32
.LookupAccountSid(serverName, sid, sbName, ref nameLength, sbDomainName, ref domainNameLength, out accountUsage);
748
int result = Interop.
Advapi32
.LogonUser(
765
result = Interop.
Advapi32
.ImpersonateLoggedOnUser(hToken);
786
Interop.
Advapi32
.RevertToSelf();
829
Debug.Assert(Interop.
Advapi32
.IsValidSid(pSid));
831
IntPtr psubAuthorityCount = Interop.
Advapi32
.GetSidSubAuthorityCount(pSid);
856
IntPtr pcurrentSubauthority = Interop.
Advapi32
.GetSidSubAuthority(pSid, i);