Ejemplo n.º 1
0
 internal RESOURCEHEADER(ByteReader br)
 {
     DataSize   = br.ReadInt32();
     HeaderSize = br.ReadInt32();
     TYPE       = ReadOrdinalOrName(br);
     NAME       = ReadOrdinalOrName(br);
     br.Align(4);
     DataVersion     = br.ReadInt32();
     MemoryFlags     = br.ReadUInt16();
     LanguageId      = br.ReadUInt16();
     Version         = br.ReadInt32();
     Characteristics = br.ReadInt32();
 }
Ejemplo n.º 2
0
        internal void ExtractResources(byte[] buf)
        {
            ByteReader br = new ByteReader(buf, 0, buf.Length);

            while (br.Length >= 32)
            {
                br.Align(4);
                RESOURCEHEADER hdr = new RESOURCEHEADER(br);
                if (hdr.DataSize != 0)
                {
                    root[hdr.TYPE][hdr.NAME][new OrdinalOrName(hdr.LanguageId)].Data = ByteBuffer.Wrap(br.ReadBytes(hdr.DataSize));
                }
            }
        }