Show / Hide Table of Contents

Class ImageFileHeader

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

Inheritance
System.Object
AbstractStructure
ImageFileHeader
Namespace: PeNet.Header.Pe
Assembly: PeNet.dll
Syntax
public class ImageFileHeader : AbstractStructure

Constructors

| Improve this Doc View Source

ImageFileHeader(IRawFile, Int64)

Create a new ImageFileHeader object.

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

A PE file.

System.Int64 offset

Raw offset to the file header.

Properties

| Improve this Doc View Source

Characteristics

Set of flags which describe the PE file in detail.

Declaration
public FileCharacteristicsType Characteristics { get; set; }
Property Value
Type Description
FileCharacteristicsType
| Improve this Doc 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<System.String>
| Improve this Doc 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
| Improve this Doc View Source

MachineResolved

String representation of the Machine flag.

Declaration
public string MachineResolved { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

NumberOfSections

The number of sections in the PE file.

Declaration
public ushort NumberOfSections { get; set; }
Property Value
Type Description
System.UInt16
| Improve this Doc View Source

NumberOfSymbols

The number of COFF symbols.

Declaration
public uint NumberOfSymbols { get; set; }
Property Value
Type Description
System.UInt32
| Improve this Doc 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
System.UInt32
| Improve this Doc View Source

SizeOfOptionalHeader

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

Declaration
public ushort SizeOfOptionalHeader { get; set; }
Property Value
Type Description
System.UInt16
| Improve this Doc View Source

TimeDateStamp

Time and date stamp.

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

Methods

| Improve this Doc 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<System.String>

List with set flags.

| Improve this Doc 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
System.String

Name of the target machine as string.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX