Пример #1
0
        internal CLRMetaData(CLRContent clrContent)
        {
            long offset = clrContent.Section.RVAToOffset(clrContent.Header.MetaDataAddress);

            content = clrContent;
            location = new StreamLocation(offset,clrContent.Header.MetaDataSize);
            header = null;
            stream_table = null;
            streams = null;
        }
Пример #2
0
        internal CLRHeader(CLRContent clrContent, DataDirectory dataDirectory)
        {
            long offset = clrContent.Section.RVAToOffset(dataDirectory.VirtualAddress);
            Stream stream = clrContent.Section.Sections.Reader.GetStream();

            stream.Seek(offset,SeekOrigin.Begin);

            content = clrContent;
            location = new StreamLocation(offset,size);
            header = Utils.Read<IMAGE_COR20_HEADER>(stream);        
        }