Esempio n. 1
0
        /// <summary>
        /// Reads the specified reader.
        /// </summary>
        /// <param name="reader">The reader.</param>
        /// <param name="header">The header.</param>
        /// <returns></returns>
        public static bool Read(BinaryReader reader, out PdbTypesHeader header)
        {
            if (reader == null)
            {
                throw new ArgumentNullException(@"reader");
            }

            header.version        = reader.ReadInt32();
            header.type_offset    = reader.ReadInt32();
            header.first_index    = reader.ReadInt32();
            header.last_index     = reader.ReadInt32();
            header.type_size      = reader.ReadInt32();
            header.file           = reader.ReadInt16();
            header.pad            = reader.ReadInt16();
            header.hash_size      = reader.ReadInt32();
            header.hash_base      = reader.ReadInt32();
            header.hash_offset    = reader.ReadInt32();
            header.hash_len       = reader.ReadInt32();
            header.search_offset  = reader.ReadInt32();
            header.search_len     = reader.ReadInt32();
            header.unknown_offset = reader.ReadInt32();
            header.unknown_len    = reader.ReadInt32();

            return(true);
        }
Esempio n. 2
0
        /// <summary>
        /// Reads the specified reader.
        /// </summary>
        /// <param name="reader">The reader.</param>
        /// <param name="header">The header.</param>
        /// <returns></returns>
        public static bool Read(BinaryReader reader, out PdbTypesHeader header)
        {
            if (reader == null)
                throw new ArgumentNullException(@"reader");

            header.version = reader.ReadInt32();
            header.type_offset = reader.ReadInt32();
            header.first_index = reader.ReadInt32();
            header.last_index = reader.ReadInt32();
            header.type_size = reader.ReadInt32();
            header.file = reader.ReadInt16();
            header.pad = reader.ReadInt16();
            header.hash_size = reader.ReadInt32();
            header.hash_base = reader.ReadInt32();
            header.hash_offset = reader.ReadInt32();
            header.hash_len = reader.ReadInt32();
            header.search_offset = reader.ReadInt32();
            header.search_len = reader.ReadInt32();
            header.unknown_offset = reader.ReadInt32();
            header.unknown_len = reader.ReadInt32();

            return true;
        }