示例#1
0
 public void Read(ReaderContext ctxt, BlobReader reader)
 {
     var actualSignature = reader.ReadUInt32();
     if (actualSignature != signature)
         throw new PEException("invalid MetadataHeader.Signature");
     MajorVersion = reader.ReadUInt16();
     MinorVersion = reader.ReadUInt16();
     var actualReserved = reader.ReadUInt32();
     if (actualReserved != reserved)
         throw new PEException("invalid MetadataHeader.Reserved");
     Version = reader.ReadUTF8SizedZeroPaddedString(4);
     var actualFlags = reader.ReadUInt16();
     if (actualFlags != flags)
         throw new PEException("invalid MetadataHeader.Flags");
     var numStreams = reader.ReadUInt16();
     StreamHeaders = new StreamHeader[numStreams];
     for (var i = 0; i < numStreams; i++)
         StreamHeaders[i].Read(ctxt, reader);
 }