Table of Contents

Class Hook

Namespace
SharpPluginLoader.Core.Memory
Assembly
SharpPluginLoader.Core.dll
public static class Hook
Inheritance
Hook
Inherited Members

Methods

Create<TFunction>(long, TFunction)

Creates a new native function hook.

public static Hook<TFunction> Create<TFunction>(long address, TFunction hook)

Parameters

address long

The address of the function to hook

hook TFunction

The hook function

Returns

Hook<TFunction>

The hook object

Type Parameters

TFunction

The type of the function to hook

Create<TFunction>(string, int, TFunction)

Creates a new native function hook.

public static Hook<TFunction>? Create<TFunction>(string pattern, int offset, TFunction hook)

Parameters

pattern string

A pattern to scan for to find the address of the function to hook

offset int

An offset from the scanned for address to the start of the function

hook TFunction

The hook function

Returns

Hook<TFunction>

The hook object, if the scan returned a result

Type Parameters

TFunction

The type of the function to hook