public static ResourceDirectoryTableHeader Parse(BinaryReader reader)
        {
            ResourceDirectoryTableHeader header = new ResourceDirectoryTableHeader();

            header.Characteristics     = reader.ReadUInt32();
            header.TimeDateStamp       = reader.ReadUInt32();
            header.MajorVersion        = reader.ReadUInt16();
            header.MinorVersion        = reader.ReadUInt16();
            header.NumberOfNameEntries = reader.ReadUInt16();
            header.NumberOfIDEntries   = reader.ReadUInt16();
            return(header);
        }
Exemplo n.º 2
0
        public static ResourceDirectoryTable Parse(BinaryReader reader)
        {
            ResourceDirectoryTable table = new ResourceDirectoryTable();

            table.Header = ResourceDirectoryTableHeader.Parse(reader);
            for (int index = 0; index < table.Header.NumberOfNameEntries; index++)
            {
                ResourceDirectoryEntry entry = ResourceDirectoryEntry.Parse(reader);
                table.NameEntries.Add(entry);
            }

            for (int index = 0; index < table.Header.NumberOfIDEntries; index++)
            {
                ResourceDirectoryEntry entry = ResourceDirectoryEntry.Parse(reader);
                table.IDEntries.Add(entry);
            }
            return(table);
        }