Skip to content

MemoryBufferConnector ​

Kind: Class

Namespace: ConnectorLib.Inject

Inheritance: SimplePipelineBase\<NullContext\> → IAddressableConnector → IDisposable → IGameConnector → IInjectHostedConnector → IPCConnector → IPipelineConnector → IPipelineConnector\<IConnectionContext\> → IScannableConnector

Public Constructors

MemoryBufferConnector()

Creates a new instance of the ConnectorLib.Inject.MemoryBufferConnector class.

Public Member Functions

virtual override

Task>

Connect()

virtual override

Task

Disconnect(string message)

virtual override

void

Init()

bool

SendString(string message)

Enqueues a message to be sent to the target buffer.

virtual override

bool

SendString(string message, NullContext context)

Enqueues a message to be sent to the target buffer.

virtual override

void

CloseContext(object context)

bool

Read(ulong address, Span buffer, int offset, int length)

bool

Write(ulong address, ReadOnlySpan buffer, int offset, int length)

bool

Freeze(ulong address, ulong value, byte size, WriteType writeType, ulong cmpAddress, ulong cmpValue, byte cmpSize, CompareType cmpType)

bool

Freeze(ulong address, ulong value, ulong mask, byte size, WriteType writeType, ulong cmpAddress, ulong cmpValue, byte cmpSize, CompareType cmpType)

bool

Unfreeze(ulong address)

ulong[]

ScanForBytes(ReadOnlySpan scanFor, ReadOnlySpan mask, bool oneOnly = true, ulong? startAddress = null, ulong? endAddress = null)

IAsyncEnumerable

ScanForBytesAsync(byte[] scanFor, string mask, int threadCount = 16, ulong? startAddress = null, ulong? endAddress = null)

bool

TryGetRegion(IntPtr address, MEMORY_BASIC_INFORMATION out region)

IEnumerable

GetRegions()

IEnumerable

GetRegions(IntPtr address)

bool

ReadMemory(long address, byte[] buffer)

bool

WriteMemory(long address, byte[] buffer)

byte[]

InjectASM(long trampoline, byte[] byteCode, int stolenBytesLength)

long

InjectASMSimple(ulong trampoline, ulong codeCaveAddress, byte[] byteCode, uint stolenBytesLength = 0)

long

InjectASMSimple(long trampoline, long codeCaveAddress, byte[] byteCode, int stolenBytesLength = 0)

long

InjectASMSimple(ulong trampoline, byte[] byteCode, uint stolenBytesLength = 0)

long

InjectASMSimple(long trampoline, byte[] byteCode, int stolenBytesLength = 0)

long

InjectASMNear(ulong trampoline, ulong codeCaveAddress, byte[] byteCode, uint stolenBytesLength = 0)

long

InjectASMNear(long trampoline, long codeCaveAddress, byte[] byteCode, int stolenBytesLength = 0)

long

InjectASMNear(ulong trampoline, byte[] byteCode, uint stolenBytesLength = 0)

long

InjectASMNear(long trampoline, byte[] byteCode, int stolenBytesLength = 0)

ulong[]

ScanForBytes(ReadOnlySpan scanFor, ReadOnlySpan mask, bool oneOnly = true, ScanHint hint = None, ulong? startAddress = null, ulong? endAddress = null)

long[]

ScanForBytes(ReadOnlySpan scanFor, ReadOnlySpan mask, bool oneOnly = true, ScanHint hint = None, long? startAddress = null, long? endAddress = null)

IAsyncEnumerable

ScanForBytesAsync(byte[] scanFor, string mask, int threadCount = 16, ScanHint hint = None, long? startAddress = null, long? endAddress = null)

IAsyncEnumerable

ScanForBytesAsync(byte[] scanFor, string mask, int threadCount = 16, ScanHint hint = None, ulong? startAddress = null, ulong? endAddress = null)

IntPtr

AllocateCodeCave(long length)

IntPtr

AllocateCodeCave(long length, IntPtr out regionBaseAddress)

IntPtr

AllocateCodeCaveNear(long length, IntPtr nearAddress)

IntPtr

AllocateCodeCaveNear(long length, IntPtr nearAddress, IntPtr out regionBaseAddress)

bool

MemoryTest()

T

Call<T>(string funcName, object[] parameters = null, bool varParams = false)

object

Call(string funcName, object[] parameters = null, bool varParams = false, Type resultType = null)

T

Call<T>(string moduleName, string funcName, object[] parameters = null, bool varParams = false)

object

Call(string moduleName, string funcName, object[] parameters = null, bool varParams = false, Type resultType = null)

T

Call<T>(Func moduleDiscriminator, string funcName, object[] parameters = null, bool varParams = false)

object

Call(Func moduleDiscriminator, string funcName, object[] parameters = null, bool varParams = false, Type resultType = null)

T

Call<T>(IntPtr funcPtr, object[] parameters = null, bool varParams = false)

object

Call(IntPtr funcPtr, object[] parameters = null, bool varParams = false, Type resultType = null)

bool

TryCall<T>(string funcName, object[] parameters, bool varParams, T out result)

bool

TryCall(string funcName, object[] parameters, bool varParams, Type resultType, object out result)

bool

TryCall<T>(string moduleName, string funcName, object[] parameters, bool varParams, T out result)

bool

TryCall(string moduleName, string funcName, object[] parameters, bool varParams, Type resultType, object out result)

bool

TryCall<T>(Func moduleDiscriminator, string funcName, object[] parameters, bool varParams, T out result)

bool

TryCall(Func moduleDiscriminator, string funcName, object[] parameters, bool varParams, Type resultType, object out result)

bool

TryCall<T>(IntPtr funcPtr, object[] parameters, bool varParams, T out result)

bool

TryCall(IntPtr funcPtr, object[] parameters, bool varParams, Type resultType, object out result)

Properties

Action, string>

SetBuffer

[get, set]

An System.Action<2 delegate that sets the buffer at the specified address to the specified message.

Func, string>

GetBuffer

[get, set]

A System.Func<2 delegate that gets the message from the buffer at the specified address.

Func, BufferStatus>

GetStatus

[get, set]

A System.Func<2 delegate that gets the buffer status at the specified address.

Action, BufferStatus>

SetStatus

[get, set]

An System.Action<2 delegate that sets the buffer status at the specified address to the specified status.

Func>

SendStatus

[get, set]

A System.Func<2 delegate that gets the address of the send buffer status.

Func>

SendBuffer

[get, set]

A System.Func<2 delegate that gets the address of the send buffer.

Func>

ReceiveStatus

[get, set]

A System.Func<2 delegate that gets the address of the receive buffer status.

Func>

ReceiveBuffer

[get, set]

A System.Func<2 delegate that gets the address of the receive buffer.

InjectConnector

Connector

[get, set]

VersionProfile

VersionProfile

[, set]

List

VersionProfiles

[get, set]

VersionProfile

ActiveVersionProfile

[get, ]

bool

Connected

[get, ]

IFeatureAware

Features

[get, ]

IEnumerable

ProcessModules

[get, ]

bool

Is32Bit

[get, ]

bool

Is64Bit

[get, ]

PointerFormat

PointerFormat

[get, ]

AOBScanMode

AOBScanMode

[get, set]

int

AOBThreads

[get, set]