/// <summary> /// Create the binary from the buffer /// </summary> /// <param name="binary">The binary</param> /// <param name="offset">The offset in the binary</param> public override void GetBinaryForm(byte[] binary, int offset) { int len = Size; binary[offset++] = (byte)this.AceType; binary[offset++] = (byte)this.AceFlags; DtypUtility.WriteUInt16ToByteArray((ushort)len, binary, offset); offset += 2; DtypUtility.WriteInt32ToByteArray(_AccessMask, binary, offset); offset += 4; DtypUtility.WriteInt32ToByteArray((int)ObjectFlags, binary, offset); offset += 4; if (ObjectFlags.HasFlag(_ObjectAceFlags.ObjectAceTypePresent)) { DtypUtility.WriteGuid(ObjectType, binary, offset); offset += 16; } if (ObjectFlags.HasFlag(_ObjectAceFlags.InheritedObjectAceTypePresent)) { DtypUtility.WriteGuid(InheritedObjectType, binary, offset); offset += 16; } _SecurityIdentifier.GetBinaryForm(binary, offset); offset += _SecurityIdentifier.Size; if (this.applicationData != null) { Array.Copy(this.applicationData, 0, binary, offset, this.applicationData.Length); offset += this.applicationData.Length; } }