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);
}
}