remotemono
|
#include <RMonoAPIFunctionWrap_Def.h>
Public Types | |
typedef RetT | WrapRetType |
typedef std::tuple< ArgsT... > | WrapArgsTuple |
typedef RMonoAPIFunctionSimple< RetT, ArgsT... > | WrapFunc |
Public Member Functions | |
void | linkWrap (blackbone::ptr_t wrapFuncAddr) |
RetT | invokeWrap (ArgsT... args) |
blackbone::ptr_t | getWrapFuncAddress () const |
Protected Attributes | |
WrapFunc | wrapFunc |
Additional Inherited Members | |
![]() | |
enum | ParamFlags { ParamFlagMonoObjectPtr = 0x0001, ParamFlagOut = 0x0002, ParamFlagDirectPtr = 0x0004, ParamFlagDisableAutoUnbox = 0x0008, ParamFlagLastArrayElement = 0x8000 } |
typedef uint16_t | variantflags_t |
A component of RMonoAPIFunction, this class provides the wrapper functions around a raw Mono API function. Wrapper functions are generated at runtime using AsmJit and then injected into the remote process (just copied over into executable memory).
Wrapper functions are necessary for many Mono API functions for the following reasons:
This class contains code to generate general wrapper functions depending on the signature of the Mono API function. To do this, it makes heavy use of template metaprogramming and it requires certain additional information about parameter types to be encoded into the function signature (this is what the tag classes like ParamOut<> or ReturnOwn<> are for). This class is also heavily tied to the implementation of RMonoAPIFunctionAPI, which is responsible for building the specific parameters and the data block required by the generated wrappers.
Note that not every Mono API function will need (or have) a wrapper function. For example, functions that only handle fundamental data types and/or pointers to non-managed resources will often not have a wrapper. For those functions, RemoteMono will just call the raw function.