Show / Hide Table of Contents

Class ImageFileHeader

The File header contains information about the structure and properties of the PE file.

Inheritance
object
AbstractStructure
ImageFileHeader
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: PeNet.Header.Pe
Assembly: PeNet.dll
Syntax
public class ImageFileHeader : AbstractStructure

Constructors

| Edit this page View Source

ImageFileHeader(IRawFile, long)

Create a new ImageFileHeader object.

Declaration
public ImageFileHeader(IRawFile peFile, long offset)
Parameters
Type Name Description
IRawFile peFile

A PE file.

long offset

Raw offset to the file header.

Properties

| Edit this page View Source

Characteristics

Set of flags which describe the PE file in detail.

Declaration
public FileCharacteristicsType Characteristics { get; set; }
Property Value
Type Description
FileCharacteristicsType
| Edit this page View Source

CharacteristicsResolved

Set of flags which describe the PE file in detail resolved to a readable list of strings.

Declaration
public List<string> CharacteristicsResolved { get; }
Property Value
Type Description
List<string>
| Edit this page View Source

Machine

The machine (CPU type) the PE file is intended for. For a string use MachineResolved

Declaration
public MachineType Machine { get; set; }
Property Value
Type Description
MachineType
| Edit this page View Source

MachineResolved

String representation of the Machine flag.

Declaration
public string MachineResolved { get; }
Property Value
Type Description
string
| Edit this page View Source

NumberOfSections

The number of sections in the PE file.

Declaration
public ushort NumberOfSections { get; set; }
Property Value
Type Description
ushort
| Edit this page View Source

NumberOfSymbols

The number of COFF symbols.

Declaration
public uint NumberOfSymbols { get; set; }
Property Value
Type Description
uint
| Edit this page View Source

PointerToSymbolTable

Pointer to COFF symbols table. They are rare in PE files, but often in obj files.

Declaration
public uint PointerToSymbolTable { get; set; }
Property Value
Type Description
uint
| Edit this page View Source

SizeOfOptionalHeader

The size of the optional header which follow the file header.

Declaration
public ushort SizeOfOptionalHeader { get; set; }
Property Value
Type Description
ushort
| Edit this page View Source

TimeDateStamp

Time and date stamp.

Declaration
public uint TimeDateStamp { get; set; }
Property Value
Type Description
uint

Methods

| Edit this page View Source

ResolveFileCharacteristics(FileCharacteristicsType)

Resolves the characteristics attribute from the COFF header to an object which holds all the characteristics a boolean properties.

Declaration
public static List<string> ResolveFileCharacteristics(FileCharacteristicsType characteristics)
Parameters
Type Name Description
FileCharacteristicsType characteristics

File header characteristics.

Returns
Type Description
List<string>

List with set flags.

| Edit this page View Source

ResolveMachine(MachineType)

Resolves the target machine number to a string containing the name of the target machine.

Declaration
public static string ResolveMachine(MachineType targetMachine)
Parameters
Type Name Description
MachineType targetMachine

Target machine value from the COFF header.

Returns
Type Description
string

Name of the target machine as string.

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX