C# Class ALFA.Shared.CodePatch

This patch encapsulates a code patch.
Inheritance: IDisposable
ファイルを表示 Open project: ALandFarAway/ALFA-Base-Resources Class Usage Examples

Public Methods

Method Description
CodePatch ( IntPtr PatchOffset, IntPtr ReplacementFunction, bool Relative ) : System

Create a code patch to change a function pointer.

CodePatch ( IntPtr PatchOffset, byte Code ) : System

Create a generalized code patch.

Dispose ( ) : void

Dispose the object.

Private Methods

Method Description
Dispose ( bool Disposing ) : void

Dispose the object.

GetCurrentProcess ( ) : IntPtr
PatchCode ( IntPtr Offset, byte Code ) : byte[]

Install a code patch and return the old code.

WriteProcessMemory ( IntPtr Process, IntPtr BaseAddress, IntPtr Buffer, IntPtr Size, IntPtr &Written ) : Int32

Method Details

CodePatch() public method

Create a code patch to change a function pointer.
public CodePatch ( IntPtr PatchOffset, IntPtr ReplacementFunction, bool Relative ) : System
PatchOffset System.IntPtr Supplies the patch offset.
ReplacementFunction System.IntPtr Supplies the replacement code /// pointer.
Relative bool Supplies true if the patch is relative. ///
return System

CodePatch() public method

Create a generalized code patch.
public CodePatch ( IntPtr PatchOffset, byte Code ) : System
PatchOffset System.IntPtr Supplies the patch offset.
Code byte Supplies the new code.
return System

Dispose() public method

Dispose the object.
public Dispose ( ) : void
return void