Ejemplo n.º 1
0
 public void Dispose()
 {
     CloseFile();
     this.defaultXeX.Dispose();
     this.isoType = IsoType.GDF;
     this.isoInfo = new IsoInfo();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Reads file system info
 /// </summary>
 private void ReadIsoData()
 {
     try
     {
         this.isoInfo            = new IsoInfo();
         this.isoInfo.SectorSize = 0x800;
         this.reader.BaseStream.Seek((long)(0x20 * this.isoInfo.SectorSize), SeekOrigin.Begin);
         if (Encoding.ASCII.GetString(this.reader.ReadBytes(20)) == "MICROSOFT*XBOX*MEDIA")
         {
             this.isoType            = IsoType.XSF;
             this.isoInfo.RootOffset = (uint)this.isoType;
         }
         else
         {
             this.file.Seek((long)((0x20 * this.isoInfo.SectorSize) + 0xfd90000), SeekOrigin.Begin);
             if (Encoding.ASCII.GetString(this.reader.ReadBytes(20)) == "MICROSOFT*XBOX*MEDIA")
             {
                 this.isoType            = IsoType.GDF;
                 this.isoInfo.RootOffset = (uint)this.isoType;
             }
             else
             {
                 this.isoType            = IsoType.XGD3;
                 this.isoInfo.RootOffset = (uint)this.isoType;
             }
         }
         this.reader.BaseStream.Seek((long)((0x20 * this.isoInfo.SectorSize) + this.isoInfo.RootOffset), SeekOrigin.Begin);
         this.isoInfo.Identifier        = this.reader.ReadBytes(20);
         this.isoInfo.RootDirSector     = this.reader.ReadUInt32();
         this.isoInfo.RootDirSize       = this.reader.ReadUInt32();
         this.isoInfo.ImageCreationTime = this.reader.ReadBytes(8);
         this.isoInfo.VolumeSize        = (ulong)(this.reader.BaseStream.Length - this.isoInfo.RootOffset);
         this.isoInfo.VolumeSectors     = (uint)(this.isoInfo.VolumeSize / ((ulong)this.isoInfo.SectorSize));
     }
     catch (Exception ex)
     {
         throw new Exception("Cannot read ISO info", ex);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Reads file system info
 /// </summary>
 private void ReadIsoData()
 {
     try
     {
         this.isoInfo = new IsoInfo();
         this.isoInfo.SectorSize = 0x800;
         this.reader.BaseStream.Seek((long)(0x20 * this.isoInfo.SectorSize), SeekOrigin.Begin);
         if (Encoding.ASCII.GetString(this.reader.ReadBytes(20)) == "MICROSOFT*XBOX*MEDIA")
         {
             this.isoType = IsoType.XSF;
             this.isoInfo.RootOffset = (uint)this.isoType;
         }
         else
         {
             this.file.Seek((long)((0x20 * this.isoInfo.SectorSize) + 0xfd90000), SeekOrigin.Begin);
             if (Encoding.ASCII.GetString(this.reader.ReadBytes(20)) == "MICROSOFT*XBOX*MEDIA")
             {
                 this.isoType = IsoType.GDF;
                 this.isoInfo.RootOffset = (uint)this.isoType;
             }
             else
             {
                 this.isoType = IsoType.XGD3;
                 this.isoInfo.RootOffset = (uint)this.isoType;
             }
         }
         this.reader.BaseStream.Seek((long)((0x20 * this.isoInfo.SectorSize) + this.isoInfo.RootOffset), SeekOrigin.Begin);
         this.isoInfo.Identifier = this.reader.ReadBytes(20);
         this.isoInfo.RootDirSector = this.reader.ReadUInt32();
         this.isoInfo.RootDirSize = this.reader.ReadUInt32();
         this.isoInfo.ImageCreationTime = this.reader.ReadBytes(8);
         this.isoInfo.VolumeSize = (ulong)(this.reader.BaseStream.Length - this.isoInfo.RootOffset);
         this.isoInfo.VolumeSectors = (uint)(this.isoInfo.VolumeSize / ((ulong)this.isoInfo.SectorSize));
     }
     catch (Exception ex)
     {
         throw new Exception("Cannot read ISO info", ex);
     }
 }
Ejemplo n.º 4
0
 public void Dispose()
 {
     CloseFile();
     this.defaultXeX.Dispose();
     this.isoType = IsoType.GDF;
     this.isoInfo = new IsoInfo();
 }