Skip to content

RemoteCallHelper ​

Helper class for making remote calls to a process.

Kind: Static class

Namespace: ConnectorLib.Inject

Public Static Functions

TResult

Call<TResult>(Process process, string funcName, object[] parameters, bool varParams = false)

object

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

TResult

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

object

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

TResult

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

object

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

TResult

Call<TResult>(Process process, ProcessModule module, string funcName, object[] parameters = null, bool varParams = false)

object

Call(Process process, ProcessModule module, string funcName, object[] parameters = null, bool varParams = false, Type returnType = null)

TResult

Call<TResult>(Process process, IntPtr function, object[] parameters = null, bool varParams = false)

object

Call(Process process, IntPtr function, object[] parameters = null, bool varParams = false, Type returnType = null)

TResult

Call<TResult>(Process process, IntPtr function, FunctionDetails functionDetails, object[] parameters = null)

object

Call(Process process, IntPtr function, FunctionDetails functionDetails, object[] parameters = null, Type returnType = null)

bool

TryLoadNewModule(Process process, string moduleName, IntPtr out moduleHandle)

Attempts to load a library into a target process.

bool

TryLoadNewModuleEx(Process process, string moduleName, IntPtr out moduleHandle)

Attempts to load a library into a target process with extended options.

bool

TryCallKernel32(Process process, string functionName, object[] parameters, IntPtr out result, ICallContext out context)

Attempts to call a function from kernel32.dll in a target process.

bool

TryGetRemoteModuleAddress(IntPtr hProcess, string moduleName, IntPtr out result)

Attempts to get the base address of a remote module by its name.

bool

TryGetRemoteFuncAddress(IntPtr hProcess, IntPtr moduleBase, string targetName, IntPtr out result)

Attempts to get the address of a function in a remote process module.

bool

TryParseRemoteModule(IntPtr hProcess, IntPtr moduleBase, RemoteModuleInfo out info)

Attempts to parse a remote module's export directory and extract function information.

bool

TryReadByte(IntPtr hProcess, IntPtr addr, byte out result)

Attempts to read an unsigned byte from the specified address in the remote process.

bool

TryReadSByte(IntPtr hProcess, IntPtr addr, sbyte out result)

Attempts to read a signed byte from the specified address in the remote process.

bool

TryReadUInt16(IntPtr hProcess, IntPtr addr, ushort out result)

Attempts to read a 16-bit unsigned integer from the specified address in the remote process.

bool

TryReadInt16(IntPtr hProcess, IntPtr addr, short out result)

Attempts to read a 16-bit signed integer from the specified address in the remote process.

bool

TryReadUInt32(IntPtr hProcess, IntPtr addr, uint out result)

Attempts to read a 32-bit unsigned integer from the specified address in the remote process.

bool

TryReadInt32(IntPtr hProcess, IntPtr addr, int out result)

Attempts to read a 32-bit signed integer from the specified address in the remote process.

bool

TryReadUInt64(IntPtr hProcess, IntPtr addr, ulong out result)

Attempts to read a 64-bit unsigned integer from the specified address in the remote process.

bool

TryReadInt64(IntPtr hProcess, IntPtr addr, long out result)

Attempts to read a 64-bit signed integer from the specified address in the remote process.

bool

TryReadUIntPtr(IntPtr hProcess, IntPtr addr, UIntPtr out result)

Attempts to read a pointer (UIntPtr) from the specified address in the remote process.

bool

TryReadIntPtr(IntPtr hProcess, IntPtr addr, IntPtr out result)

Attempts to read a pointer (IntPtr) from the specified address in the remote process.

bool

TryReadStruct<TValue>(IntPtr hProcess, IntPtr addr, TValue out result)

bool

TryReadNullTerminatedASCIIString(IntPtr hProcess, IntPtr addr, int maxLength, string out result)

Reads a null-terminated ASCII string from the specified address.

bool

TryReadNullTerminatedUTF8String(IntPtr hProcess, IntPtr addr, int maxLength, string out result)

Reads a null-terminated UTF-8 string from the specified address.

bool

TryReadNullTerminatedUTF16String(IntPtr hProcess, IntPtr addr, int maxLength, string out result)

Reads a null-terminated UTF-16 string from the specified address.

bool

TryReadLengthPrefixedASCIIString(IntPtr hProcess, IntPtr addr, int lengthSize, string out result)

Reads a length-prefixed ASCII string from the specified address.

bool

TryReadLengthPrefixedUTF8String(IntPtr hProcess, IntPtr addr, int lengthSize, string out result)

Reads a length-prefixed UTF-8 string from the specified address.

bool

TryReadLengthPrefixedUTF16String(IntPtr hProcess, IntPtr addr, int lengthSize, string out result)

Reads a length-prefixed UTF-16 string from the specified address.

Properties

static

bool

SuppressCall

[get, set]

Suppresses the call to the remote function.