Exemple #1
0
        public static PublicEntry[] From(BinaryReader rd, SectionEntry header, SmxNameTable names)
        {
            if (header.Size % Size != 0)
            {
                throw new Exception("invalid public table size");
            }
            var count   = header.Size / Size;
            var entries = new PublicEntry[count];

            for (var i = 0; i < count; i++)
            {
                var entry = new PublicEntry();
                entry.Address  = rd.ReadUInt32();
                entry.nameoffs = rd.ReadInt32();
                entry.Name     = names.StringAt(entry.nameoffs);
                entries[i]     = entry;
            }
            return(entries);
        }
Exemple #2
0
 public SmxPublicTable(FileHeader file, SectionEntry header, SmxNameTable names)
     : base(file, header)
 {
     publics_ = PublicEntry.From(file.SectionReader(header), header, names);
 }
Exemple #3
0
 public static PublicEntry[] From(BinaryReader rd, SectionEntry header, SmxNameTable names)
 {
     if (header.Size % Size != 0)
         throw new Exception("invalid public table size");
     var count = header.Size / Size;
     var entries = new PublicEntry[count];
     for (var i = 0; i < count; i++)
     {
         var entry = new PublicEntry();
         entry.Address = rd.ReadUInt32();
         entry.nameoffs = rd.ReadInt32();
         entry.Name = names.StringAt(entry.nameoffs);
         entries[i] = entry;
     }
     return entries;
 }