Table of Contents

Class BytesPatch

Namespace
AsmResolver.Patching
Assembly
AsmResolver.dll

Patches an instance of ISegment with a sequence of bytes.

public sealed class BytesPatch : IPatch
Inheritance
BytesPatch
Implements
Inherited Members

Constructors

BytesPatch(uint, byte[])

Creates a new bytes patch.

public BytesPatch(uint relativeOffset, byte[] newData)

Parameters

relativeOffset uint

The offset to start writing at.

newData byte[]

The new data.

Properties

NewData

Gets the data to write.

public byte[] NewData { get; }

Property Value

byte[]

RelativeOffset

Gets the offset relative to the start of the segment to start writing at.

public uint RelativeOffset { get; }

Property Value

uint

Methods

Apply(in PatchContext)

Applies the patch.

public void Apply(in PatchContext context)

Parameters

context PatchContext

The context in which to

UpdateOffsets(in RelocationParameters)

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

public void UpdateOffsets(in RelocationParameters parameters)

Parameters

parameters RelocationParameters

The parameters containing the new offset information for the segment.