Ejemplo n.º 1
0
 public SamDomain OpenDomain(SecurityIdentifier domainSid, SamDomainAccessMask accessMask)
 {
     SafeSamHandle domainHandle;
     NtStatus result = NativeMethods.SamOpenDomain(this.Handle, accessMask, domainSid, out domainHandle);
     Validator.AssertSuccess(result);
     return new SamDomain(domainHandle);
 }
Ejemplo n.º 2
0
        public SamDomain OpenDomain(SecurityIdentifier domainSid, SamDomainAccessMask accessMask)
        {
            SafeSamHandle domainHandle;
            NtStatus      result = NativeMethods.SamOpenDomain(this.Handle, accessMask, domainSid, out domainHandle);

            Validator.AssertSuccess(result);
            return(new SamDomain(domainHandle));
        }
Ejemplo n.º 3
0
 internal static NtStatus SamOpenDomain(SafeSamHandle serverHandle, SamDomainAccessMask desiredAccess, SecurityIdentifier domainSid, out SafeSamHandle domainHandle)
 {
     byte[] binarySid = domainSid.GetBinaryForm();
     return(SamOpenDomain(serverHandle, desiredAccess, binarySid, out domainHandle));
 }
Ejemplo n.º 4
0
 private static extern NtStatus SamOpenDomain(SafeSamHandle serverHandle, SamDomainAccessMask desiredAccess, [MarshalAs(UnmanagedType.LPArray)] byte[] domainId, out SafeSamHandle domainHandle);
Ejemplo n.º 5
0
        public SamDomain OpenDomain(string domainName, SamDomainAccessMask accessMask)
        {
            SecurityIdentifier domainSid = this.LookupDomain(domainName);

            return(this.OpenDomain(domainSid, accessMask));
        }
Ejemplo n.º 6
0
 public SamDomain OpenDomain(string domainName, SamDomainAccessMask accessMask)
 {
     SecurityIdentifier domainSid = this.LookupDomain(domainName);
     return this.OpenDomain(domainSid, accessMask);
 }