public uint MinorsGreaterThanOrEqualTo; // DMDiag reports this as 'minors:   >= x', more than 4 bytes are reported as error

        public DiskGroupRecord(List <DatabaseRecordFragment> fragments) : base(fragments)
        {
            // Data begins at 0x10 (VBLK header is at 0x00)
            int offset = 0x00; // relative to Data

            ReadCommonFields(this.Data, ref offset);
            if (RecordRevision == 3)
            {
                DiskGroupGuid = new Guid(ReadVarString(this.Data, ref offset));
            }
            else if (RecordRevision == 4)
            {
                DiskGroupGuid = BigEndianReader.ReadGuidBytes(this.Data, ref offset);
                DiskSetGuid   = BigEndianReader.ReadGuidBytes(this.Data, ref offset);
            }
            else
            {
                throw new NotImplementedException("Unsupported record revision");
            }
            offset += 4; // 4 Zeros
            CommitTransactionID = BigEndianReader.ReadUInt64(this.Data, ref offset);

            if (HasNumberOfCopiesFlag)
            {
                NumberOfConfigCopies = ReadVarUInt(this.Data, ref offset);
                NumberOfLogCopies    = ReadVarUInt(this.Data, ref offset);
            }

            if (HasMinorsFlag)
            {
                MinorsGreaterThanOrEqualTo = ReadVarUInt(this.Data, ref offset);
            }
        }
예제 #2
0
        public VolumeRecord(List <DatabaseRecordFragment> fragments) : base(fragments)
        {
            // Data begins at 0x10 (VBLK header is at 0x00)
            int offset = 0x00; // relative to Data

            ReadCommonFields(this.Data, ref offset);
            if (RecordRevision != 5)
            {
                throw new NotImplementedException("Unsupported record revision");
            }
            VolumeTypeString = ReadVarString(this.Data, ref offset);
            DisableDriverLetterAssignmentString = ReadVarString(this.Data, ref offset);
            StateString          = ByteReader.ReadAnsiString(this.Data, ref offset, 14).Trim('\0');
            ReadPolicy           = (ReadPolicyName)ByteReader.ReadByte(this.Data, ref offset);
            VolumeNumber         = ReadVarUInt(this.Data, ref offset);
            VolumeFlags          = (VolumeFlags)BigEndianReader.ReadUInt32(this.Data, ref offset);
            NumberOfComponents   = ReadVarUInt(this.Data, ref offset);
            CommitTransactionID  = BigEndianReader.ReadUInt64(this.Data, ref offset);
            UnknownTransactionID = BigEndianReader.ReadUInt64(this.Data, ref offset);

            SizeLBA       = ReadVarULong(this.Data, ref offset);
            offset       += 4;
            PartitionType = (PartitionType)ByteReader.ReadByte(this.Data, ref offset);
            VolumeGuid    = BigEndianReader.ReadGuidBytes(this.Data, ref offset);

            if (HasUnknownID1Flag)
            {
                UnknownID1 = ReadVarULong(this.Data, ref offset);
            }

            if (HasUnknownID2Flag)
            {
                UnknownID2 = ReadVarULong(this.Data, ref offset);
            }

            if (HasColumnSizeFlag)
            {
                ColumnSizeLBA = ReadVarULong(this.Data, ref offset);
            }

            if (HasMountHintFlag)
            {
                MountHint = ReadVarString(this.Data, ref offset);
            }
        }
예제 #3
0
        public DiskRecord(List <DatabaseRecordFragment> fragments) : base(fragments)
        {
            // Data begins at 0x10 (VBLK header is at 0x00)
            int offset = 0x00; // relative to Data

            ReadCommonFields(this.Data, ref offset);
            if (RecordRevision == 3)
            {
                string diskGuidString = ReadVarString(this.Data, ref offset);
                DiskGuid = new Guid(diskGuidString);
            }
            else if (RecordRevision == 4)
            {
                DiskGuid    = BigEndianReader.ReadGuidBytes(this.Data, ref offset);
                AltGuidRev4 = BigEndianReader.ReadGuidBytes(this.Data, ref offset);
            }
            else
            {
                throw new NotImplementedException("Unsupported record revision");
            }
            LastDeviceName      = ReadVarString(this.Data, ref offset);
            DiskFlags           = (DiskFlags)BigEndianReader.ReadUInt32(this.Data, ref offset);
            CommitTransactionID = BigEndianReader.ReadUInt64(this.Data, ref offset);
        }