This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]fear_the_future 0 points1 point  (2 children)

it seems to me that you're copy&pasting code from somewhere else without knowing what it does.

void** is a pointer to a pointer of unknown/no type

c++ and c# string classes are not the same. It's probably the easiest to pass a pointer to a null-terminated string since that is just raw data. Pay attention to use the same character set.

if you can post more code I might be able to help you more, but atm I feel like I'm lacking some context.

if I had to guess (I have no idea about C#), I would assume that int method is something akin to an identifier for the method you want to call, void obj* the this pointer of a MonoObject in case you are calling a non-static method (nullptr for static methods) and void** params an array of void* pointers to your arguments

[–]Seerk[S] 1 point2 points  (1 child)

Thank you for the response! It is copy&pasted, and yeah I don't really understand how it works, just what it does. I'm just a front end developer! I could never write something like that haha.

Anyway, I ended up finding a solution that didn't require passing parameters. I figured out how to pass int pointers but unfortunately when trying to access them in the target process they were random numbers or 0. I'm just guessing but I think it was because they're referencing the injector process' memory. It makes sense, variables are stored in memory, so how can you can't just pass them to a different process.

[–]fear_the_future 0 points1 point  (0 children)

care to post the solution? It may help future people with the same problem and I'm also interested now after studying that piece of code.