Table of Contents

Class CustomManagedNativeHeader

Namespace
AsmResolver.PE.DotNet
Assembly
AsmResolver.PE.dll

Represents a managed native header of a .NET Portable Executable that is in an unsupported or unknown file format.

public class CustomManagedNativeHeader : SegmentBase, IManagedNativeHeader, ISegment, IOffsetProvider, IWritable
Inheritance
CustomManagedNativeHeader
Implements
Inherited Members

Constructors

CustomManagedNativeHeader(ManagedNativeHeaderSignature, ISegment)

Creates a new custom managed native header.

public CustomManagedNativeHeader(ManagedNativeHeaderSignature signature, ISegment contents)

Parameters

signature ManagedNativeHeaderSignature

The signature to use.

contents ISegment

The contents of the header, excluding the signature.

Properties

Contents

Gets the contents of the header, excluding the signature.

public ISegment Contents { get; }

Property Value

ISegment

Signature

Gets the signature of the native header, indicating the type of metadata that is stored.

public ManagedNativeHeaderSignature Signature { get; }

Property Value

ManagedNativeHeaderSignature

Methods

GetPhysicalSize()

Computes the number of bytes that the structure contains.

public override uint GetPhysicalSize()

Returns

uint

The number of bytes.

UpdateOffsets(in RelocationParameters)

Assigns a new file and virtual offset to the segment and all its sub-components.

public override void UpdateOffsets(in RelocationParameters parameters)

Parameters

parameters RelocationParameters

The parameters containing the new offset information for the segment.

Write(BinaryStreamWriter)

Serializes the structure to an output stream.

public override void Write(BinaryStreamWriter writer)

Parameters

writer BinaryStreamWriter

The output stream to write the data to.