Represents an export directory in a windows assembly image.
상속: FileSegment
예제 #1
0
        internal static ImageExportDirectory FromReadingContext(ReadingContext context)
        {
            var application = context.Assembly;
            var reader      = context.Reader;

            var directory = new ImageExportDirectory
            {
                _readingContext = context,

                StartOffset = reader.Position,

                Characteristics       = reader.ReadUInt32(),
                TimeDateStamp         = reader.ReadUInt32(),
                MajorVersion          = reader.ReadUInt16(),
                MinorVersion          = reader.ReadUInt16(),
                NameRva               = reader.ReadUInt32(),
                OrdinalBase           = reader.ReadUInt32(),
                NumberOfFunctions     = reader.ReadUInt32(),
                NumberOfNames         = reader.ReadUInt32(),
                AddressOfFunctions    = reader.ReadUInt32(),
                AddressOfNames        = reader.ReadUInt32(),
                AddressOfNameOrdinals = reader.ReadUInt32(),
            };

            var nameReader = reader.CreateSubReader(application.RvaToFileOffset(directory.NameRva));

            directory.Name = nameReader.ReadAsciiString();

            return(directory);
        }
예제 #2
0
        internal static ImageExportDirectory FromReadingContext(ReadingContext context)
        {
            var application = context.Assembly;
            var reader = context.Reader;

            var directory = new ImageExportDirectory
            {
                _readingContext = context,

                StartOffset = reader.Position,

                Characteristics = reader.ReadUInt32(),
                TimeDateStamp = reader.ReadUInt32(),
                MajorVersion = reader.ReadUInt16(),
                MinorVersion = reader.ReadUInt16(),
                NameRva = reader.ReadUInt32(),
                OrdinalBase = reader.ReadUInt32(),
                NumberOfFunctions = reader.ReadUInt32(),
                NumberOfNames = reader.ReadUInt32(),
                AddressOfFunctions = reader.ReadUInt32(),
                AddressOfNames = reader.ReadUInt32(),
                AddressOfNameOrdinals = reader.ReadUInt32(),
            };

            var nameReader = reader.CreateSubReader(application.RvaToFileOffset(directory.NameRva));
            directory.Name = nameReader.ReadAsciiString();

            return directory;
        }