Class ImageFileHeader
The File header contains information about the structure and properties of the PE file.
Namespace: PeNet.Header.Pe
Assembly: PeNet.dll
Syntax
public class ImageFileHeader : AbstractStructure
Constructors
| Improve this Doc View SourceImageFileHeader(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 SourceCharacteristics
Set of flags which describe the PE file in detail.
Declaration
public FileCharacteristicsType Characteristics { get; set; }
Property Value
Type | Description |
---|---|
FileCharacteristicsType |
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> |
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 |
MachineResolved
String representation of the Machine flag.
Declaration
public string MachineResolved { get; }
Property Value
Type | Description |
---|---|
System.String |
NumberOfSections
The number of sections in the PE file.
Declaration
public ushort NumberOfSections { get; set; }
Property Value
Type | Description |
---|---|
System.UInt16 |
NumberOfSymbols
The number of COFF symbols.
Declaration
public uint NumberOfSymbols { get; set; }
Property Value
Type | Description |
---|---|
System.UInt32 |
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 |
SizeOfOptionalHeader
The size of the optional header which follow the file header.
Declaration
public ushort SizeOfOptionalHeader { get; set; }
Property Value
Type | Description |
---|---|
System.UInt16 |
TimeDateStamp
Time and date stamp.
Declaration
public uint TimeDateStamp { get; set; }
Property Value
Type | Description |
---|---|
System.UInt32 |
Methods
| Improve this Doc View SourceResolveFileCharacteristics(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. |
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. |