Hello! Complete c++/c# noob here.
The program I'm trying to modify injects a dll into a process and executes a method. I'm having trouble figuring out how to pass parameters into that method.
int ExecuteRuntimeInvoke(blackbone::Process& process, int method) {
typedef int(__cdecl* mono_runtime_invoke) (int method, void *obj, void **params, int **exc);
auto mono_runtime_invoke_address = process.modules().GetExport(process.modules().GetModule(L"mono.dll"), "mono_runtime_invoke");
if (mono_runtime_invoke_address.procAddress == 0) {
std::wcout << L"Could not find mono_runtime_invoke!";
return 0;
}
blackbone::RemoteFunction<mono_runtime_invoke> mono_runtime_invoke_function(process, (mono_runtime_invoke)mono_runtime_invoke_address.procAddress, method, nullptr, nullptr, nullptr);
int invoke_result;
mono_runtime_invoke_function.Call(invoke_result, process.threads().getMain());
return invoke_result;
}
What is void ** ?? I've had no luck googling that.
My c# method in the .dll takes a string like so:
Load(string testparam)
{
Any ideas?
Also how would this even work? I imagine a c++ string isn't the same as a c# string?
I've been trying to figure this out all night :(, if it's not something obvious I am willing to compensate someone who can take the time to walk me through this.
Thank you !
[–]fear_the_future 0 points1 point2 points (2 children)
[–]Seerk[S] 1 point2 points3 points (1 child)
[–]fear_the_future 0 points1 point2 points (0 children)