/// <summary>
        ///     Reads from the <see cref="stream" />
        /// </summary>
        /// <param name="stream"></param>
        public void Read(Stream stream)
        {
            var streamRw = new StreamRW(stream);

            EntryName  = streamRw.ReadBytes(64);
            NameLength = streamRw.ReadUInt16();
            StgType    = (StgType)streamRw.ReadByte();
            streamRw.ReadByte();
            LeftSibling  = streamRw.ReadInt32();
            RightSibling = streamRw.ReadInt32();
            Child        = streamRw.ReadInt32();

            if (StgType == StgType.StgInvalid)
            {
                LeftSibling  = Nostream;
                RightSibling = Nostream;
                Child        = Nostream;
            }

            StorageCLSID = new Guid(streamRw.ReadBytes(16));
            StateBits    = streamRw.ReadInt32();
            CreationDate = streamRw.ReadBytes(8);
            ModifyDate   = streamRw.ReadBytes(8);
            StartSector  = streamRw.ReadInt32();
            Size         = streamRw.ReadInt64();
        }
Ejemplo n.º 2
0
        /// <summary>
        ///     Reads from the <see cref="stream" />
        /// </summary>
        /// <param name="stream"></param>
        public void Read(Stream stream)
        {
            var streamRw = new StreamRW(stream);

            HeaderSignature = streamRw.ReadBytes(8);
            CheckSignature();
            CLSID        = streamRw.ReadBytes(16);
            MinorVersion = streamRw.ReadUInt16();
            MajorVersion = streamRw.ReadUInt16();
            CheckVersion();
            ByteOrder              = streamRw.ReadUInt16();
            SectorShift            = streamRw.ReadUInt16();
            MiniSectorShift        = streamRw.ReadUInt16();
            UnUsed                 = streamRw.ReadBytes(6);
            DirectorySectorsNumber = streamRw.ReadInt32();
            FATSectorsNumber       = streamRw.ReadInt32();
            FirstDirectorySectorId = streamRw.ReadInt32();
            UnUsed2                = streamRw.ReadUInt32();
            MinSizeStandardStream  = streamRw.ReadUInt32();
            FirstMiniFATSectorId   = streamRw.ReadInt32();
            MiniFATSectorsNumber   = streamRw.ReadUInt32();
            FirstDIFATSectorId     = streamRw.ReadInt32();
            DIFATSectorsNumber     = streamRw.ReadUInt32();

            for (var i = 0; i < 109; i++)
            {
                DIFAT[i] = streamRw.ReadInt32();
            }

            streamRw.Close();
        }
Ejemplo n.º 3
0
        /// <summary>
        ///     Reads from the <see cref="stream" />
        /// </summary>
        /// <param name="stream"></param>
        public void Read(Stream stream)
        {
            var streamRw = new StreamRW(stream);

            HeaderSignature = streamRw.ReadBytes(8);
            CheckSignature();
            CLSID = streamRw.ReadBytes(16);
            MinorVersion = streamRw.ReadUInt16();
            MajorVersion = streamRw.ReadUInt16();
            CheckVersion();
            ByteOrder = streamRw.ReadUInt16();
            SectorShift = streamRw.ReadUInt16();
            MiniSectorShift = streamRw.ReadUInt16();
            UnUsed = streamRw.ReadBytes(6);
            DirectorySectorsNumber = streamRw.ReadInt32();
            FATSectorsNumber = streamRw.ReadInt32();
            FirstDirectorySectorId = streamRw.ReadInt32();
            UnUsed2 = streamRw.ReadUInt32();
            MinSizeStandardStream = streamRw.ReadUInt32();
            FirstMiniFATSectorId = streamRw.ReadInt32();
            MiniFATSectorsNumber = streamRw.ReadUInt32();
            FirstDIFATSectorId = streamRw.ReadInt32();
            DIFATSectorsNumber = streamRw.ReadUInt32();

            for (var i = 0; i < 109; i++)
                DIFAT[i] = streamRw.ReadInt32();

            streamRw.Close();
        }