Ejemplo n.º 1
0
            /// <summary>Adds a security identifier (SID) to the boundary descriptor.</summary>
            /// <param name="pSid">A pointer to a <c>SID</c> structure.</param>
            /// <returns>
            /// <para>If the function succeeds, the return value is nonzero.</para>
            /// <para>If the function fails, the return value is zero. To get extended error information, call <c>GetLastError</c>.</para>
            /// </returns>
            public bool AddSid(PSID pSid)
            {
                BoundaryDescriptorHandle h = handle;

                if (Marshal.ReadByte(pSid.DangerousGetHandle(), 7) == 16)
                {
                    return(AddIntegrityLabelToBoundaryDescriptor(ref h, pSid));
                }
                return(AddSIDToBoundaryDescriptor(ref h, pSid));
            }
Ejemplo n.º 2
0
 /// <summary>Indicates whether the current object is equal to another object of the same type.</summary>
 /// <param name="other">An object to compare with this object.</param>
 /// <returns>true if the current object is equal to the <paramref name="other"/> parameter; otherwise, false.</returns>
 public bool Equals(PSID other) => Equals(other.DangerousGetHandle());