예제 #1
0
 /// <summary>The <c>GetAce</c> function obtains a pointer to an access control entry (ACE) in an access control list (ACL).</summary>
 /// <param name="pAcl">A pointer to an ACL that contains the ACE to be retrieved.</param>
 /// <param name="aceIndex">
 /// The index of the ACE to be retrieved. A value of zero corresponds to the first ACE in the ACL, a value of one to the second ACE,
 /// and so on.
 /// </param>
 /// <returns>A pointer to the ACE.</returns>
 public static PACE GetAce(this PACL pAcl, uint aceIndex)
 {
     Win32Error.ThrowLastErrorIfFalse(AdvApi32.GetAce(pAcl, aceIndex, out var acePtr));
     return(acePtr);
 }
예제 #2
0
 /// <summary>Determines whether the components of a security descriptor are valid.</summary>
 /// <param name="pSD">The pointer to the SECURITY_DESCRIPTOR structure to query.</param>
 /// <returns>
 /// <c>true</c> if the components of the security descriptor are valid. If any of the components of the security descriptor are not
 /// valid, the return value is <c>false</c>.
 /// </returns>
 public static bool IsValidSecurityDescriptor(this PSECURITY_DESCRIPTOR pSD) => AdvApi32.IsValidSecurityDescriptor(pSD);