System.Security.AccessControl.GenericAcl.GetBinaryForm C# (CSharp) Method

GetBinaryForm() public abstract method

public abstract GetBinaryForm ( byte binaryForm, int offset ) : void
binaryForm byte
offset int
return void
        public abstract void GetBinaryForm(byte[] binaryForm, int offset);
        public System.Security.AccessControl.AceEnumerator GetEnumerator() { throw null; }

Usage Example

示例#1
0
        public void GetBinaryForm(byte[] binaryForm, int offset)
        {
            ControlFlags controlFlags = ControlFlags;

            binaryForm[offset + 0x00] = Revision;
            binaryForm[offset + 0x01] = InternalReservedField;
            WriteUShort((ushort)controlFlags, binaryForm,
                        offset + 0x02);

            // Skip 'offset' fields (will fill later)
            int pos = 0x14;

            if (Owner != null)
            {
                WriteInt(pos, binaryForm, offset + 0x04);
                Owner.GetBinaryForm(binaryForm, offset + pos);
                pos += Owner.BinaryLength;
            }
            else
            {
                WriteInt(0, binaryForm, offset + 0x04);
            }

            if (Group != null)
            {
                WriteInt(pos, binaryForm, offset + 0x08);
                Group.GetBinaryForm(binaryForm, offset + pos);
                pos += Group.BinaryLength;
            }
            else
            {
                WriteInt(0, binaryForm, offset + 0x08);
            }

            GenericAcl sysAcl = InternalSacl;

            if (SaclPresent)
            {
                WriteInt(pos, binaryForm, offset + 0x0C);
                sysAcl.GetBinaryForm(binaryForm, offset + pos);
                pos += InternalSacl.BinaryLength;
            }
            else
            {
                WriteInt(0, binaryForm, offset + 0x0C);
            }

            GenericAcl discAcl = InternalDacl;

            if (DaclPresent)
            {
                WriteInt(pos, binaryForm, offset + 0x10);
                discAcl.GetBinaryForm(binaryForm, offset + pos);
                pos += InternalDacl.BinaryLength;
            }
            else
            {
                WriteInt(0, binaryForm, offset + 0x10);
            }
        }
All Usage Examples Of System.Security.AccessControl.GenericAcl::GetBinaryForm