Ejemplo n.º 1
0
 private void ReadRegionTable()
 {
     _fileStream.Position = 192 * Sizes.OneKiB;
     _regionTable         = Utilities.ReadStruct <RegionTable>(_fileStream);
     foreach (var entry in _regionTable.Regions.Values)
     {
         if ((entry.Flags & RegionFlags.Required) != 0)
         {
             if (entry.Guid != RegionTable.BatGuid && entry.Guid != RegionTable.MetadataRegionGuid)
             {
                 throw new IOException("Invalid VHDX file - unrecognised required region");
             }
         }
     }
 }
Ejemplo n.º 2
0
 private void ReadRegionTable()
 {
     _fileStream.Position = 192 * Sizes.OneKiB;
     _regionTable = Utilities.ReadStruct<RegionTable>(_fileStream);
     foreach (var entry in _regionTable.Regions.Values)
     {
         if ((entry.Flags & RegionFlags.Required) != 0)
         {
             if (entry.Guid != RegionTable.BatGuid && entry.Guid != RegionTable.MetadataRegionGuid)
             {
                 throw new IOException("Invalid VHDX file - unrecognised required region");
             }
         }
     }
 }