Actually read the target process from the plugin while function patching

This commit is contained in:
Maschell
2020-06-19 17:04:39 +02:00
parent ce73ac48e0
commit c76edf09c4
3 changed files with 10 additions and 4 deletions

View File

@@ -23,11 +23,12 @@
class FunctionData {
public:
FunctionData(void *paddress, void *vaddress, const std::string &name, function_replacement_library_type_t library, void *replaceAddr, void *replaceCall) {
FunctionData(void *paddress, void *vaddress, const std::string &name, function_replacement_library_type_t library, void *replaceAddr, void *replaceCall, FunctionPatcherTargetProcess targetProcess) {
this->paddress = paddress;
this->vaddress = vaddress;
this->name = name;
this->library = library;
this->targetProcess = targetProcess;
this->replaceAddr = replaceAddr;
this->replaceCall = replaceCall;
}
@@ -60,11 +61,16 @@ public:
return replaceCall;
}
const FunctionPatcherTargetProcess getTargetProcess() const {
return targetProcess;
}
private:
void *paddress = NULL;
void *vaddress = NULL;
std::string name;
function_replacement_library_type_t library;
FunctionPatcherTargetProcess targetProcess;
void *replaceAddr = NULL;
void *replaceCall = NULL;
};